0

My Android app mixes a native part (user autentication and secure code retrieval) with an HTML part loaded with loadURL (webpage with javascript Kinetics for some drawing options).

Inside one of my javascripts I need to access an external server for data retrieval. This external access needs autentication. I want to use the autentication data stored in my SharedPrefernences during the autentication inside the native part.

Is there a way to access shared prefs from inside my javascripts in the HTML part?

nicBBB
  • 267
  • 1
  • 4
  • 18

1 Answers1

3

create native plug-in using cordova. and access it in javascript HTML.

http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_android_index.md.html

for cordova plug-in tutorial

http://devgirl.org/2013/07/17/tutorial-how-to-write-a-phonegap-plugin-for-android/

for cordova SharedPreferences Which way is preferred to store my android application settings to access them via phonegap and java file

Community
  • 1
  • 1
Ajeet47
  • 1,849
  • 3
  • 14
  • 18
  • Could work, only I don´t find anything in Cordova API that refers to sharedprefs. How to use Cordova to get previously stored sharedprefs? – nicBBB Dec 20 '13 at 15:58