Android billing api allow us to check whether user purchase certain items.
But what if I want to give out some item to user free when they achieve something (e.g. share the app with 5 friends). Is there any way I can tell google that user own this item?
If no, that mean I need to setup my server to store which user has which free item. To check whether user has certain item, I need to check from my server and billing api as well. But how to make the webservice secure? If the app just simply tell server that user with certain email address has item x, it seems that bad guy can play around this and just fake server he has everything.
UPDATE:
For example, to tell my sever that user A has obtained item A. I would send a call to
my webservice url with payload {user:xxx@email.com, item:A}.
But anyone can send this payload to the webservice url. How to I protect this?