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
aaronmotek
Posts: 14
Registered: ‎10-04-2010
My Device: Not Specified
Accepted Solution

invoke appworld issue

i'm trying to launch appworld from a blackberry webworks application ala: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-open-App-World-from-a-Bla...

 

I'm getting the following error from both a 5.0 and a 6.0 device:

 

error: Failed to invoke Java application url=net_rim_bb_appworld?8000 Error starting null: null

 

this is the code:

 

launch_appworld(8000);
function launch_appworld(appworldid) {
   try {
        var params = new Array();
        params[0]=appworldid;

        var args = new blackberry.invoke.JavaArguments('net_rim_bb_appworld', params);

        blackberry.invoke.invoke(blackberry.invoke.APP_JAVA, args);
   } catch (err) {
alert(err);
        var url = "http://appworld.blackberry.com/webstore/content/" + appworldid;
               
        var args = new blackberry.invoke.BrowserArguments(url);
        blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
       
   }

}

 

This is from the config.xml

 

 <feature id="blackberry.invoke" required="true" version="1.0.0.0"/>
 <feature id="blackberry.invoke.JavaArguments" required="true" version="1.0.0.0"/>
 <feature id="blackberry.invoke.BrowserArguments" required="true" version="1.0.0.0"/>

 

Interestingly, the fallback does work, it launches the browser, which then in turn launches appworld pointing to the right applicaiton, which is a work-around, but not as smooth.  The appworld invoke does work if i pass in an empty array for params instead of an array with 1 appworldid argument.

 

Any idea what might be wrong?  Has the command-line argument for appworld changed?

 

Please use plain text.
Contributor
aaronmotek
Posts: 14
Registered: ‎10-04-2010
My Device: Not Specified

Re: invoke appworld issue

For anyone else with the same problem, I never managed to get it to work via the blackberry.invoke method.  What did finally work for me was to write my own javascript extension using the Registry & Invocation microedition classes ala the example here: 

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/1573156/How_To_-_Inte...

 

Writing my own extension using the ApplicationManager instead, whether via the invoke, invokeApplication or runApplication methods all failed.  The javax.microedition.Invocation method is the only one that worked.

 

 

Please use plain text.