apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 209 forks source link

private mode #20

Closed mrmoses closed 9 years ago

mrmoses commented 9 years ago

It would be nice to be able to set the preference file as private.

For Android: SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(cordova.getActivity(), Context.MODE_PRIVATE);

Not sure if or how other systems offer private mode.

apla commented 9 years ago

Operating mode. Use 0 or MODE_PRIVATE for the default operation, MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE to control permissions. The bit MODE_MULTI_PROCESS can also be used if multiple processes are mutating the same SharedPreferences file. MODE_MULTI_PROCESS is always on in apps targeting Gingerbread (Android 2.3) and below, and off by default in later versions.

from here