Kalina
Kalina

Reputation: 5594

How to check if a user has a subscription (Android in-app billing)?

I've been trying to use the Google Play Android Developer API but just realized that that might not be what I should be doing:

Your servers should never query subscription status dynamically, based on individual requests from your Android application. -Google

I don't have my own servers and don't anticipate over 15000 daily app uses (the API allows 15000 requests per day), and was just planning on checking the subscription state every time the app is started up.

This seems to be what Google is saying I should not be doing. So, how can I check a user's subscription state otherwise?

Upvotes: 8

Views: 10087

Answers (1)

Victor Ronin
Victor Ronin

Reputation: 23268

I believe the answer is a couple of paragraphs above in the same document :

  • Store subscription expiry on your servers

  • Cache expiration and purchaseState

  • Query for subscription status only at expiration

Generally, what they are saying is that you should cache the state of subscription and don't query it each time.

Upvotes: 5

Related Questions