2

HTML5 app (Cordova Supported) is running on Google Play and i do hold lot of local storage items of user . Now i am going to release Android pure native app so i don't want user to register again for my app instead i want to use earlier local storage items from app which is running.

Using those earlier user preferences stored in local storage , i would rather not to run new registration and run on old user registration Preferences .

Is their any way that i can do it ??

Rizvan
  • 2,335
  • 2
  • 23
  • 42
  • By any means, can you backup a copy of your local storage on the server side and use this with your new version later on? and you have to guarantee that this is done before updating the application. Also, [here](http://stackoverflow.com/questions/15184567/is-local-storage-for-a-phonegap-app-on-an-android-device-separate-from-the-built) it is mentioned that local storage cannot be accessed by 3rd party applications. So you dont have a workaround for this, except using the existing app. I find this approach safer, from security considerations. – Himanshu Soni Dec 06 '13 at 05:40

1 Answers1

1

Following steps can answer it precisely :

  1. Keep Cordova in your android native build .
  2. Keep index.html in Assest folder .
  3. Run Webview(index.html) using cordova
  4. Fetch local storage variables using window.location .
  5. Run Only first time with splash screen and as soon as you get the all the existing app storage variables and later on never start run the app with webview only native view completely.
  6. Store all variables in SharedPreferences.
Rizvan
  • 2,335
  • 2
  • 23
  • 42