You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
You are using SharedPreferences for storing the purchase status in your code sample. Of course it's not really save and you're right, when you advice to store the information in a different way. But the main problem of a "local check only" is, that the status will be reset, in case the user either reinstalls the app or uses multiple devices. What about a double check by using google billingservices? I'll try to make it clear with the following pseudo code:
Hi jberkel, thank you very much for the code.
You are using SharedPreferences for storing the purchase status in your code sample. Of course it's not really save and you're right, when you advice to store the information in a different way. But the main problem of a "local check only" is, that the status will be reset, in case the user either reinstalls the app or uses multiple devices. What about a double check by using google billingservices? I'll try to make it clear with the following pseudo code:
bool IsPro = GetValueFromSharedPreferences();
if(IsPro)
IsPro = TryGetIsPro();
private bool TryGetIsPro(){
//request google billingservice
//if(response == requestfailed (e.g. internet connection not available || response == purchased))
return true;
return false;
}
Would it be a reasonable approach? How would the implementation look like in this case?
Thanks!
The text was updated successfully, but these errors were encountered: