Access shared preferences inside the app

I have already saved my data in sharedpreferences using a broadcast
receiver INSTALL_REFERRER intent, now I want to access the data inside
my hybrid app.

Here is the link to the plugin I am using for that purpose :

Using this plugin I want to save the sharedreference

and using https://github.com/edelworksgithub/SharedPreferences/blob/master/src/android/Sharedpreferences.java
plugin I want to retrieve the information I saved that time:

somewhat like this

sharedpreferences.getString(“referrer”, successHandler, errorHandler);

error : I’m not able to get the referrer value inside the application.
i run the command through adb shell

am broadcast -a com.android.vending.INSTALL_REFERRER \
-n com.ionicframework.emergency269287/com.eightz.mobile.cordova.plugin.android.referrer.Receiver \
--es "referrer" "textinreferrer"

@mhartington @max @Ben can anyone of you help me in this ?

1 Like