Are there any examples of invoking the BlackBerry 10 browser to open on an onclick
event? I'm trying to do this with the native SDK using c++.
Thanks
Are there any examples of invoking the BlackBerry 10 browser to open on an onclick
event? I'm trying to do this with the native SDK using c++.
Thanks
Taken from the sample here:
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);
}
Using the following attributes...
An example is available here
navigator_invoke_invocation_t *invoke = NULL;
navigator_invoke_invocation_create(&invoke);
navigator_invoke_invocation_set_target(invoke, "sys.browser");
navigator_invoke_invocation_set_action(invoke, "bb.action.OPEN");
navigator_invoke_invocation_set_uri(invoke, "http://stackoverflow.com");
navigator_invoke_invocation_send(invoke);
navigator_invoke_invocation_destroy(invoke);