12-09-2012 03:40 PM
Solved! Go to Solution.
12-09-2012 04:55 PM
function openWebLink() { // open web link - allows the system to choose an appropriate target that handles http:// blackberry.invoke.invoke({ uri: "http://www.blackberry.com" }, onInvokeSuccess, onInvokeError); } function openWebLinkInBrowser() { // open web link in browser blackberry.invoke.invoke({ target: "sys.browser", uri: "http://www.blackberry.com" }, onInvokeSuccess, onInvokeError); }
12-10-2012 09:33 AM
Hello, you can do it this way as well.
https://developer.blackberry.com/html5/apis/blackb
function openWebLinkInBrowser() {
// open web link in browser
blackberry.invoke.invoke({
target: "sys.browser",
uri: "http://www.blackberry.com"
}, onInvokeSuccess, onInvokeError);
}
12-10-2012 02:32 PM - edited 12-10-2012 02:33 PM
Thank you. Something's still missing. It does not open the page and does not show an error message.
Dev Alpha A is updated and the SDK as well.
Here's my javascript:
function test()
{
blackberry.invoke.invoke({
target: "sys.browser",
uri:"http://www.google.com"
}, onInvokeSuccess, onInvokeError);
}
function onInvokeSuccess() {
alert("Invocation successful!");
}
function onInvokeError(error) {
alert("Invocation failed, error: " + error);
}
And here's my Config.xml:
<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0" id="com.xxxxx.xxxx">
<name>xxxx</name>
<description>xxxx</description>
<versionNumber>1.0.0.0</versionNumber>
<content src="index.html"/>
<author rim:copyright="2012" email="xxxx@googlemail.com">xxxxxx</author>
<icon rim:hover="false" src="icon.jpg"/>
<icon rim:hover="true" src="icon.jpg"/>
<rim:splash src="launch.jpg"/>
<feature id="blackberry.app.orientation">
<param name="mode" value="portrait" />
</feature>
<feature id="blackberry.invoke" />
</widget>
12-11-2012 11:01 AM
12-11-2012 12:17 PM
Can you try installing this Invoker sample app from our GitHub repo?
https://github.com/blackberry/BB10-WebWorks-Sample
12-12-2012 05:02 PM