Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 813
Kalina Avatar asked Sep 10 '12 19:09

Kalina


People also ask

How do I check app subscriptions on Android?

To view and manage your Android subscriptions, open the Google Play Store app on your device, then tap the menu button (the three horizontal lines in the top left), then choose Subscriptions. You'll see a list of all the subscriptions, such as Google Play Music, handled through Google.

How do I confirm my subscription on Google Play?

ANDROID TABLET OR PHONE Open the Play Store app on your phone or tablet. Tap the Menu button (three horizontal lines), Account > Subscriptions. Find the relevant subscription in your list, and then tap Cancel.


1 Answers

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.

like image 56
Victor Ronin Avatar answered Oct 08 '22 14:10

Victor Ronin