cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Cruz Viotti <>
Subject Access config.xml preferences from the JavaScript side of a plugin
Date Wed, 06 Aug 2014 02:15:21 GMT
Hi everyone,

I’ve stumbled in the situation where I want to read the value of a preference present in
config.xml from the JavaScript side of a Cordova plugin. 

My current approach is the following:

-  Create a native service (iOS in this case) with a method called `getPreference` which queries
- Wait on the `deviceready` event from the plugin’s JavaScript file.
- Call `getPreference` with `cordova.exec`.

I’d like to avoid this complexity and overhead and just be able to query the preferences
from the JavaScript side of the plugin, without depending on the native side.

I’ve created a StackOverflow question (
some time ago (tagged as Cordova) but it was never answered. I’ve also found a very similar
question that wasn’t answered neither:

I’ve looked at Cordova modules such as argscheck, channel, utils, etc in the GitHub repo
( however I couldn’t find what I’m looking for.

Can someone point me in the right direction?

Thanks a lot in advance.


Juan Cruz Viotti, Software Engineer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message