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
willcainsvg
Posts: 9
Registered: ‎12-14-2010
My Device: 9930
Accepted Solution

Launch BlackBerry WebWorks app via URL with parameters?

I have a WebWorks app that I would like to launch from a browser URL, and pass URL query parameters to the app that way. Can this be done? How? I would be happy to use HttpFilterRegistry or the Invoke API, but I don't see how to use those approaches to obtain the parameters from within my WebWorks app, even if I write a custom extension. Sample code would be very helpful, especially for consuming the parameters. Or at least an indication of which API(s) can do this.

Will
Contributor
Ranaman
Posts: 44
Registered: ‎12-01-2009
My Device: Not Specified

Re: Launch BlackBerry WebWorks app via URL with parameters?

This should be taken care of by the framework. What I would recoemmend is simply invoking the application as per normal and placing the parameters in the URL with the standard  "&" "?" notation.

 

Then leverage the UTIL JS class to pull out the required passed parameters... 

https://bdsc.webapps.blackberry.com/html5/apis/blackberry.utils.URL.html

 

(If you need help invoking the app, it is done like invoking any other java app on the device)

 

R

New Contributor
willcainsvg
Posts: 9
Registered: ‎12-14-2010
My Device: 9930

Re: Launch BlackBerry WebWorks app via URL with parameters?

Thanks!  I think that's enough to get me started implementing the consumption side.  Could you point me to anything about launching a Java app from a URL?  Perhaps I need to use HttpFilterRegistry.registerFilter()?  Not sure how/where to do that in WebWorks.

Will
Contributor
Ranaman
Posts: 44
Registered: ‎12-01-2009
My Device: Not Specified

Re: Launch BlackBerry WebWorks app via URL with parameters?

New Contributor
willcainsvg
Posts: 9
Registered: ‎12-14-2010
My Device: 9930

Re: Launch BlackBerry WebWorks app via URL with parameters?

Ok, thanks!  Hopefully that's easy from WebWorks.  =)  I guess I have to write an extension and include the HttpFilterRegistry.registerFilter() call and Protocol.java implementation there.

Will
Developer
dtater
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha

Re: Launch BlackBerry WebWorks app via URL with parameters?

Hi there. Did you ever manage to solve this? If so, how? I am exploring similar functionality for an application i am writing. Thanks for your time.
- - - - - - - - - -
New Developer
rlammers
Posts: 6
Registered: ‎05-10-2012
My Device: BlackBerry PlayBook 16BG

Re: Launch BlackBerry WebWorks app via URL with parameters?

I'm facing the same problem. Registering a custom uri scheme for the PlayBook on the Adobe Air platform is really easy. Is there a solution yet for this problem?

 

Thank you in advance!