1

I'm using ionic to build my application and used localStorage to get and set variables. I need to access those variables from my plugin which is in java .Is that possible to to do.

following code is in javascript

var LOCAL_TOKEN_KEY = 'yourTokenKey';
var token="123";
window.localStorage.setItem(LOCAL_TOKEN_KEY, token);

I want to access that variable from my plugin which is written in java.

george
  • 41
  • 6
  • Possible duplicate of [Phonegap get localstorage values from Java code?](http://stackoverflow.com/questions/10370005/phonegap-get-localstorage-values-from-java-code) – Gavriel Jan 29 '16 at 09:42
  • 1
    You can try this: https://github.com/driftyco/cordova-plugin-local-storage-retrieval/blob/master/src/android/LocalStoragePlugin.java – Gavriel Jan 29 '16 at 09:43

0 Answers0