08-30-2012 09:11 AM
I am facing an error when using blackberry.invoke feature and blackberry,invoke.BrowserArguments
I have a group of items in an imageList an item is defined like this line
<div data-bb-type="item" onclick="openUptownCairoLink()
function openUptownCairoLink() {
try{
var args = new blackberry.invoke.BrowserArguments('http://blackberry.com');
blackberry.invoke.invoke(blackberry.invoke.APP_BR
}catch(e){ alert(e) }
}
and when I click the item it alerts the error as in the subject of this topic.
I am using BB Bold 9900 with OS 7
Solved! Go to Solution.
08-30-2012 09:14 AM
Can you post up your config.xml file... can you also specify the domain that this content is loaded into?
i.e. is this a local page in the appliation? or is it brought in from a different domain?
08-30-2012 09:31 AM
<widget xmlns:rim="http://www.blackberry.com/ns/widgets" version="0.9.1.1" rim:header="RIM-Widget:rim/widget" xmlns="http://www.w3.org/ns/widgets">
<rim:navigation mode="focus" />
<name>Emaar</name>
<description>Emaar Misr Privilege Program</description>
<author>Swipe 'n Tap</author>
<access subdomains="true" uri="*" />
<rim:cache disableAllCache="true"/>
<icon rim:hover="false" src="images/icon.png" />
<icon rim:hover="true" src="images/icon.png" />
<rim:loadingScreen backgroundColor="#CFCFCF"
backgroundImage="images/Splash.jpg"
onFirstLaunch="true">
<rim:transitionEffect type="fadeOut" />
</rim:loadingScreen>
<content src="http://192.168.0.140:8888/Emaar/www/index.htm" />
<feature id="blackberry.push" />
<feature id="blackberry.ui.menu" />
<feature id="blackberry.ui.dialog"/>
<feature id="blackberry.identity" />
<feature id="blackberry.system.event" />
<feature id="blackberry.app" />
<feature id="blackberry.invoke.BrowserArguments" />
<feature id="blackberry.invoke.PhoneArguments" />
<feature id="blackberry.invoke" />
<feature id="blackberry.app.event"/>
</widget>
Here is my config.xml file and I am loading the index.htm from external domain so that the development could be faster instead of each time blackberry reloads itself when a new version is installed.
So if that is the problem how can I enable the same features for the external domain ?
08-30-2012 09:35 AM
You will want to do the following:
<access uri="http://192.168.0.140:8888" subdomains="true"> <feature id="blackberry.push" /> <feature id="blackberry.ui.menu" /> <feature id="blackberry.ui.dialog"/> <feature id="blackberry.identity" /> <feature id="blackberry.system.event" /> <feature id="blackberry.app" /> <feature id="blackberry.invoke.BrowserArguments" /> <feature id="blackberry.invoke.PhoneArguments" /> <feature id="blackberry.invoke" /> <feature id="blackberry.app.event"/> </access>