I already have a completely free app published at Google Play store.
Since the app is more popular than I have thought, I decided to lock some of the features and demand in-app billing before using it. However, I prefer that all existing users will continue to enjoy have the premium features for free.
So, I thought about the following:
Is there a way to grant some users an item for "free"? In the In-App billing documentation is written that there must be a price for all in-app billing items.
There is no direct way to do it from google. You will be having 2 test-cases:-
user-id
on your server and when you implement your in-App in application send this user-id to your server. Case 1:- Your server will match it with existing DB if it matches the id return you success message.
Case 2:- For new users along with this user-id your app should send purchase token to your server for verification and after verifying the purchase your server should send success message.
Common task:- When your application starts you should always call restoreTransaction() after that you will get a list from google contains information about already purchased items and you will unlock that content. Make sure you have server verification implementation in you app.