I would like to know if the in-app billing api needs to have internet access when checking if the user have purchased an item or not.
I want to sell game levels using the in-app billing but don’t want to access the internet everytime the user starts playing the level.
Does market have any cache mechanism to avoid calling the server everytime? Do I need to implement it on my app?
There are two types of purchases. Managed and unmanaged. Managed products can only be bought once, however unmanaged products can be bought any number of times.
There is no caching as such by the market app. Say for example, you have a managed product ID setup, and you a user has already bought it. The next time you request the market app to buy the same item, it will return with a response, saying “already purchased”.
In case of unmanaged items, it just carries out the transaction.
In both the cases, internet is required.
It’s upto you how you save the transactions locally, and initiate a purchase by checking if you really need to do another purchase.