Closed matuskopo closed 9 years ago
What platform you're using?
I was testing it on Android and iOS. I've created preferences files with script from bin directory of plugin, but there was also bug, cause script is creating file "platforms/android/res/xml/apppreferences.xml" for Android. But in Activity class it wants to read from "R.xml.preferences" file. So I had to rename apppreferences.xml to preferences.xml in res/xml folder, to build it successfully for Android.
please test your app: https://gist.github.com/apla/71ffbda54a5ca7e6e0df
I've tested it, and you are right, that number is incrementing, even after application restart. What I've problem with what, that I have no plugins object defined, unless DeviceReady event is fired. So I've defined prefs object in deviceReady callback as this:
app.prefs = plugins.appPreferences;
app is standard cordova application related object. I will try to define it as "var prefs" and just to initialize it in deviceReady callback. Will give you feedback then.
Thanks
Oh man. Please forget this issue. Problem was ME. When storing values I forgot to wait for success callback and I was doing other actions immediately in my App. So I think, values were never stored successfully. As your test is working great. Sorry for that. Thank you
at least one issue is fixed on my side -)
Hello,
plugin works on latest cordova 5.0.0 apps, but when I restart the application (or reload app's webview), nothing is stored in preferences anymore. During application lifecycle it's OK.
Bye