Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 12
Registered: ‎04-16-2012
My Device: Bold 9780
My Carrier: Vodafone
Accepted Solution

Phonegap BlackBerry, problem in loading remote html files

[ Edited ]

Hello,

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.

1) I copyall the javascript files present in the application archive (plugin javascript files) to

file:///store/home/user/sample/

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).

 Now,

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 hapens if we point to any html in fle system  (file:///SDCard or file:///store)?

What we have to do in this case to use any cordova plugns?

 

Thanks in advance..........

Highlighted
Contributor
Posts: 12
Registered: ‎04-16-2012
My Device: Bold 9780
My Carrier: Vodafone

Re: Phonegap BlackBerry, problem in loading remote html files

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

Contributor
Posts: 12
Registered: ‎04-16-2012
My Device: Bold 9780
My Carrier: Vodafone

Re: Phonegap BlackBerry, problem in loading remote html files

[ Edited ]

It was a simple thing Smiley Happy

Adding the required features to each access domain will do the trick.

eg:-

 

<access subdomains="true" uri="file:///store/home">
  <feature id="blackberry.system" required="true" version="1.0.0.0" />
  <feature id="org.apache.cordova" required="true" version="1.0.0" />
  <feature id="blackberry.find" required="true" version="1.0.0.0" />
  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />

etc.....

</access>

 

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.