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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
StevenKader
Posts: 616
Registered: ‎02-03-2010
My Carrier: Rogers
Accepted Solution

BB10 - How to Launch App World from Javascript?

Has anyone launched App World to one title from javascript.  I tried this on dev alpha and it isn't working :

 

function openWebLinkInBrowser(URL) {
    // open web link in browser
    blackberry.invoke.invoke({
        target: "sys.browser",
        uri:URL
    }, onInvokeSuccess, onInvokeError);
}



function appWorld(appId)
{
   try 
   {
	
	var url = "http://appworld.blackberry.com/webstore/content/" + appId;
	openWebLinkInBrowser (url) ; 
	
	
   } 
   catch (e) {
	showCustomToast("There was a problem launching App World", "OK");
   }
}

 


Steven Kader at JaredCo
   Follow me on Twitter     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
Contributor
DMA2011
Posts: 32
Registered: ‎09-19-2011
My Carrier: none

Re: BB10 - How to Launch App World from Javascript?

This works in playbook to open at a specific app.

 

var url = "http://appworld.blackberry.com/webstore/content/103601";
       
    try {
        var args = new blackberry.invoke.BrowserArguments(url);
        blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
    }
    catch (e) {
        alert('exception (Appworld): ' + e.name + '; ' + e.message);
    }
}

Please use plain text.
Developer
StevenKader
Posts: 616
Registered: ‎02-03-2010
My Carrier: Rogers

Re: BB10 - How to Launch App World from Javascript?

I use something similar to this in Cascades and it works.....but not working in Webworks.....perhaps I have a parameter wrong :

 

var request = {
"type": "application/x-bb-appworld",
"uri": "appworld://content/12603",
"action": "bb.action.OPEN",
"action_type": "ALL"
};
blackberry.invoke.query(request, onInvokeSuccess, onInvokeError);

 

 

 


Steven Kader at JaredCo
   Follow me on Twitter     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
BlackBerry Development Advisor
erikjohnzon
Posts: 236
Registered: ‎09-21-2012
My Carrier: Virgin

Re: BB10 - How to Launch App World from Javascript?

Here is some documentation from Cascades that describes the invoke targets... https://developer.blackberry.com/cascades/documentation/device_platform/invocation/blackberry_world....

 

You can do it by issueing the following which is an un-bound. As you can see from the documentation you can also add in the target if you wish, but the uri protocol is the important part.

 

blackberry.invoke.invoke({
    "uri": "appworld://content/12603",
    "action": "bb.action.OPEN", 
    "action_type": "ALL"
})

Please replace the 12603 with the content you wish to show.

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.