The Android docs say this about creating a developer payload string when making an in-app purchase:
It’s good practice to pass in a string that helps your application to identify the user who made the purchase, so that you can later verify that this is a legitimate purchase by that user. For consumable items, you can use a randomly generated string, but for non-consumable items you should use a string that uniquely identifies the user.
I want some way of identifying a user so that I know that person has purchased non-consumable items, regardless of what Android device they are using. I don't want to set up a server. I don't want to use their gmail account ID because, as of Android 6.0, that means asking the user to grant the dangerous GET_ACCOUNTS
permission. I know you can also run into problems if the user has more than one Google account on their device.
Does anyone know of a solution that meets all these criteria (cross-device; no server; no dangerous permissions required)?
Incidentally I did find an old blog post about Google account ID:
This will key the local data against a Google Account ID, which is unique and stable for the user even after changing an email address.
Does this require a dangerous permission to use? If not, and it's constant across a user's devices, then this may meet my criteria...