Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Values not consistent #138

Open
fabianglace opened this issue Mar 9, 2019 · 1 comment
Open

Values not consistent #138

fabianglace opened this issue Mar 9, 2019 · 1 comment

Comments

@fabianglace
Copy link

Using android 8+, cordova 8+.

On first load gets ID from server and save successfully.
When i close the app and reopen it ID is there
Close the app again and reopen ID not there, error code: 2. Gets the ID from server and saves again. When reopen the app ID is there but when i close and reopen does not have ID. So essentially the data is not persistent. When i close the app or update it looses the data.

code sample

NativeStorage.getItem("user", function(obj){
uid = obj.uid;
}, function(error){
getFromServer()
});

getFromServer(){
//server get code
var user = {uid: uid};

NativeStorage.setItem("user", user, function(){}, function(){});
}

Im I doing something wrong?

@CodeWithOz
Copy link

@fabianglace did you find a way around this? I think one of my users is experiencing something similar.

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

No branches or pull requests

2 participants