Closed JimmyChung1991 closed 7 years ago
So you've tried to save a value in Android via putString
and retrieve it via getItem
in JS.
I hope you've followed my 'instructions' here?
What works (?):
What doesn't work (?):
To be of better help, please provide me with more logging information related to the error, e.g. where is the exception thrown.
solved it Thanks,bro
I'm glad it works now! Please consider explaining what the problem was, and how you solved it. This can come in handy for people with the same problems.
Hi, private void cordovaPreference() { // Log.i("jimmy","url"+url);
I store the reference in android Then I get it from ionic side. NativeStorage.getItem("reference") .then( data=>console.log("nativestoragesuccess"+data), error=>console.error("nativestorageerror"+error.exception) ); The strange thing is that when I put "reference", "12342345" or the value is just num. It's ok But editor.putString("reference", "12342345fasdfaf") or any value contains a-z .It show SyntaxError: Unexpected token f .I don't get it