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
Regular Contributor
ingybing
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified
Accepted Solution

Super App, link from calendar to my webworks application.

Hi

 

I was wondering if anyone can suggest and approach to achieve the following. I'm writing a webworks application which will add appointments to the native blackberry calendar. In the notes field would be a link which can be used to jump back into the webworks application. for example

 

http://myapp.com/showclient/10

 

this link should being the webworks application out of the background and bring it foreground and then show client number 10's details.

 

I've started to tackle this by using a httpfilter for the domain "myapp.com". 

 

HttpFilterRegistry.registerFilter("myapp.com","mypackage.filters",true);

 

in the filter Protocol.java file's openFilter method i can see the name of the url (i.e. the action and client number etc) but where i'm stuck is identifying the mechanism to invoke the javascript on my webworks application to bring it to foreground and load the client.

 

My current setup is a webworks app with a native extension which registers the httpfilter. At this point i've tried stashing away a reference to the script engine, reference to the javascript to call as a parameter to the extension method but when the URL is caught and i try to read the read the script engine or javascript reference they are null. I suspect the httpfilter is being picked up in a different application space or something?? ;-S 

 

So can anyone tell me how from a httpfilter to invoke my webworks application and pass to it the information needed to move to the right pages.

Regular Contributor
ingybing
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: Super App, link from calendar to my webworks application.

Managed to sort this using by using the ApplicationManager and posting a global event and having a global event listener back in my webworks application to handle it just incase anyone's trying to do something similar