2

I am going to create an Android application using HTML5/jQuery and Phonegap In app Browser. I will display web page inside the In app Browser,

I want to implement the functionality that the user only enters his Name when he first time access the application.

I can save value using Phonegap's Local Storage but can't find how to access this value inside In app Browser.

Any help will be much appreciated.

Thanks.

Reinstate Monica Cellio
  • 25,975
  • 6
  • 51
  • 67
user2200021
  • 33
  • 1
  • 4
  • 1
    If people aren't capable of giving suggestions or answers that do not involve javascript and/or jquery then STOP REMOVING THE TAGS. They're perfectly acceptable as the answer may involed javascript communicating with the client application. Until that's ruled out the tags are relevant. – Reinstate Monica Cellio Jul 23 '13 at 10:34
  • @Archer Ummm can we put the `Phonegap` tag here instead of `javascript`. Something I tried and got rejected. – NREZ Jul 23 '13 at 10:42
  • I am not sure about Android, but Phonegap for iOS actually saves the LocalStorage database under the key 'WebDatabaseDirectory' in user defaults, and I assume the InAppBrowser should be able to access it in some way… hope it helps. – Metaphox Jul 23 '13 at 15:19

2 Answers2

0

Check the following documentation for more information

Is local storage for a Phonegap app on an Android device separate from the built in browser?

Community
  • 1
  • 1
Arun Bertil
  • 4,598
  • 4
  • 33
  • 59
  • I used this to save and get data in local storage: `var storage = window.localStorage; localStorage.myname = "test value"; var name = localStorage.myname;` and this to call in app browser: 'var ref = window.open('URL', '_blank', 'location=yes'); ' So, i got the value in name variable. So, i wanna ask if i can access this variable inside in app browser. – user2200021 Jul 23 '13 at 14:24
  • were you able to resolve this? i.e. is the storage available to both the in app browser (phonegap) and the device browser? – David Jul 24 '13 at 23:39
0

I just tested it but it seems like the inappbrowser and your phone gap app uses different localStorage as if they are two different browser instances.

Nathan V
  • 31
  • 1