Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

loadData() in Sample (MainActivity) #4

Open
fliese opened this issue Jul 27, 2013 · 0 comments
Open

loadData() in Sample (MainActivity) #4

fliese opened this issue Jul 27, 2013 · 0 comments

Comments

@fliese
Copy link

fliese commented Jul 27, 2013

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant