Rizvan
Rizvan

Reputation: 2355

Fetch Local Storage Items before Android Native App

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 ??

Upvotes: 2

Views: 476

Answers (1)

Rizvan
Rizvan

Reputation: 2355

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.

Upvotes: 1

Related Questions