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
New Contributor
Posts: 5
Registered: ‎06-28-2011
My Device: 9800
My Carrier: SMC-Voda

Launch WebWorks App from browser

I am developing a WebWorks App for smartphone.

 

How can I launch it with browser, like by go to a open url?

 

Thanks.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Launch WebWorks App from browser

Unfortunatley there isn't a way to launch an application from the browser.  This would impose a security risk from the web.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 39
Registered: ‎03-01-2011
My Device: PlayBook
My Carrier: AT&T

Re: Launch WebWorks App from browser

is there a way to launch an application from another application.  let's say i had two applications similar to cardiotrainer and cardiotrainer pro.  if i had both applications, i would want to allow cardiotrainer to open cardiotrainer pro that has additional features.  i know webOS has  some code that allows opening native apps from other native apps

 

this.controller.serviceRequest(

'palm://com.palm.applicationManager',

{

method: 'launch',

parameters: {id: <appID>}})

 

would be a tremendous help if possible. thanks!

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Launch WebWorks App from browser

You betcha.. you can find the API here

 

http://www.blackberry.com/developers/docs/webworks/api/blackberry.invoke.JavaArguments.html

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 39
Registered: ‎03-01-2011
My Device: PlayBook
My Carrier: AT&T

Re: Launch WebWorks App from browser

[ Edited ]

***update: this would be for the playbook, not a smartphone***

 

Thanks! I understand how calling something like APP_CAMERA works, but how would I specifically call my PicSketcher app?

var args = new blackberry.invoke.JavaArguments('net_rim_bb_memo_app');
blackberry.invoke.invoke(blackberry.invoke.APP_JAVA, args); // Java

I'm not sure how I would specifically call my app. By AppName, AppID (number in App World?) or something else?

Also, is there a way to call the app when the user does a swipeUp? i noticed a swipeDown for a menu, but how do I register that the user is minimizing the app? I'll be using these two in concert.

Thanks for the help!

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Launch WebWorks App from browser

Ah.. Are you referring to PlayBook?

 

Invoking another 3rd party application is only available on the BlackBerry OS.  This functionality isn't currently available on the PlayBook OS.

 

There is an onBackground event you can listen to when your application goes to the background and an onForeground event when you come back to the foreground.

 

http://www.blackberry.com/developers/docs/webworks/api/blackberry.app.event.html

 

Whether or not the onBackground will fire will be based on how the user has setup their PlayBook to either pause background applications or to let them run.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter