Note that there are some explanatory texts on larger screens.

plurals
  1. POIdentifying Users of Google Play Subscriptions
    text
    copied!<p>How do I implement (Auto-renewable) Subscriptions for an Android App.</p> <p>I've read the <a href="http://developer.android.com/google/play/billing/billing_overview.html" rel="nofollow">documentation</a> </p> <p>and as far as I understand, the process is the following:</p> <ul> <li>User subscribes to such a subscriptions on the app. This will generate a Purchase token.</li> <li>The app sends this token to the server <strong>along with something to identify this user</strong></li> <li>The server will store this Purchase token with this user and will mark the subscription as valid</li> <li>the server validates this Purchase token via the http-api periodically (typically once per day) with something like a cronjob</li> <li>if the subscription isn't valid anymore, the subscription will be marked as invalid on the server-side.</li> <li>If the app makes requests to the server to resources that need the subscription, the client will send this user-identity-string along with the requests. We then check in the database, if the subscription of this user is still marked as valid.</li> </ul> <p>My question is now, how we should identify this users? Do we have a simple user id available that we can share between our app and our server? or should we use something different? What is the best practice here?</p> <p>We did already similar subscriptions on ios and we used the uuid of the device to identify the users (at least as long as we were able to use the uuid).</p> <hr> <p>From the Answer below we should generate a unique ID. This would be unique per device (or per app-installation). But if a user changes his device or reinstalls the application this id would not be the same anymore. So I'm not sure, how the process is in this use case. I thought of something like this:</p> <ul> <li>The user is logged in with the same google play account on his second device.</li> <li>As the app starts (or becomes active) we would fetch the users subscriptions</li> <li>We then would receive this purchase token from the subscriptions and send them along with the new unique-ID to our backend-server as if the user had made a new subscription.</li> </ul> <p>Would this be the right process? And stays the purchase token the same as it was on the first device?</p> <hr> <p>Ok, my question about identifiying users is answered, the link provided delivers enough informations. I'll put further questions in new threads on SO, if I have some.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload