Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I specify a specific file for preferences for Android? #97

Closed
pke opened this issue Jun 26, 2016 · 2 comments
Closed

Can I specify a specific file for preferences for Android? #97

pke opened this issue Jun 26, 2016 · 2 comments

Comments

@pke
Copy link

pke commented Jun 26, 2016

I'm migrating a titanium app to cordova and titanium app preferences are saved in:
/data/data/com.domainname.appname/shared_prefs/titanium.xml

is there a way to read this file with this plugin?

@apla
Copy link
Owner

apla commented Jul 10, 2016

Android have two possible calls to get shared preferences — default preferences and named ones. I've just added (commit e56013a) possibility to work with named preferences on Android. I'm not sure about titanium preferences format and my code is untested, but you can try. Usage:

var appPrefs = plugins.appPreferences;
var titaniumPrefs = appPrefs.suite('titanium');
titaniumPrefs.fetch()

@benjaminpetrin hacked preference reading in his fork to do similar task: https://github.com/getadored/me.apla.cordova.app-preferences/commit/32893cf05adeec4fc7b6eaf4c66ce16bf5467306

@apla
Copy link
Owner

apla commented Jul 16, 2016

There is a wiki page about that functionality: Suites

@pke pke closed this as completed Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants