Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:30:10+00:00 2026-06-17T10:30:10+00:00

My app is free and, using in-app purchases, I’d like to enable additional functionality.

  • 0

My app is free and, using in-app purchases, I’d like to enable additional functionality. To do so, I am envisioning generating an unlock code that is dependent on the current user and the current app version. I need the first so that the same key won’t work with someone else’s installation (but will work for multiple devices owned by the same user). I may not need the second, but it would give a bit more future flexibility.

To do this, I need some sort of google user id. Is there such a thing? If so, how do I get it?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:30:12+00:00Added an answer on June 17, 2026 at 10:30 am

    Google takes care of some of this for you. It will deliver a device dependent key to each device for a user. Your job is

    1) Validate the key properly on your server

    2) Make sure you return a device-specific authorization value from the server so users cannot just copy data files around.

    3) On the device, use the authorization value to enable things.

    Validating the key is easy but do make sure you do it on a server. The problem is identifying the device. Google and its partners dropped the ball a bit on that. Tim Bray has a blog article at http://android-developers.blogspot.ca/2011/03/identifying-app-installations.html that discusses the problem. I recommend using the ANDROID_ID despite his reservations. I have doubts about the security of his other proposal but haven’t done a full analysis. Definitely stay away from anything network related (IMSI, IMEI, ESN, …). I also cache the device identifier used and make sure it doesn’t change.

    Personally, I scramble the data needed to unlock my features in my app. When I get a valid transaction, I compute a key that can be combined with the device id to unlock the data. It is far from perfect but seems to work. I accept that I will be hacked – I just don’t want it to be obvious.

    If you want a per-version key, then you need to do a RESTORE_TRANSACTIONS and re-validate at the server any time the version changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I would like to make a free app with full functionality loaded in.
I am using heroku to host a clojure app using noir. Its the free
I thought I'd try a simple GUI app using the world/universe mutation-free approach, but
I have a free App that I am about to update. After the update
I am making an app like the Android market where all free app will
Is it possible to have a free iPhone app that has say an initial
I have an app that uses core data. The app is free for download
I'm writing an app (in iOS 5 using ARC!) that presents several hundred objects
I wrote an iPhone app that plays wma stream, using libmms and ffmpeg open
I'm trying to embed some Lua scripting functionality in my C# app by using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.