12-05-2012 08:35 AM - edited 12-05-2012 11:26 PM
In my app I start with index.html which is present in the aplication archive. In debug console I can see 'n' number of plugins found(which arepresent in plugin.xml) . And i get deviceready call-back also.
2) I download an html files and keep in file:///store/home/user/sample/. (say pag1.html)
page1.html includes all the plugin js files
3) I set window.location to file:///store/home/user/sample/page1.html
This time I can neither see any of the plugins found messages in debug console nor the 'deviceready' cal-back is called(listener is added in onload of page1.html body).
1) I copy the downloaded html(page1.html) file to 'sample' directory in aplication resources and in index.html I set window.location to local:///sample/page1.html
2) Build the app run it
It works absolutely fine.
What we have to do in this case to use any cordova plugns?
Thanks in advance..........
Solved! Go to Solution.
12-06-2012 01:31 AM
And it is found that the plugin api calls dont work in any remote page(in file system or remote host), though we give access in config.html. I use cordova-2.2.0
12-17-2012 05:13 AM - edited 12-17-2012 05:17 AM
It was a simple thing
Adding the required features to each access domain will do the trick.
<access subdomains="true" uri="file:///store/home">
<feature id="blackberry.system" required="true" version="18.104.22.168" />
<feature id="org.apache.cordova" required="true" version="1.0.0" />
<feature id="blackberry.find" required="true" version="22.214.171.124" />
<feature id="blackberry.identity" required="true" version="126.96.36.199" />
<feature id="blackberry.identity.phone" required="true" version="188.8.131.52" />
The self-closed access tags in default config.xml while creating a new phonegap project was really misleading, that iI never thought it can have any child node for <access> tag.