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

Java Development

Reply
Contributor
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

Capture URL from Browser Address bar

Hi there,

 

My application needs to handle the URL from the Browser. For instance, when user enters a URL (www.google.com) on the Address Bar then hits "Go" or presses "Enter" key, my application will capture this URL.

 

I have tried the HttpFilterRegistry but it only allows me to filter a specified URL not for all URLs.

 

Thanks,

 

Hand

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Capture URL from Browser Address bar

Don't beleive this is possible. 

 

What are you wanting to achieve?

Contributor
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

Re: Capture URL from Browser Address bar

I just want to capture this url from the web browser. My application define a custom protocol (ex: bella://). When the user type the url begins with bella://, my application will capture it and come to foreground.

Do you have any idea, Peter?
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Capture URL from Browser Address bar

Look at HttpFilterRepository.  It doesn't directly answer your question - the idea is that it is supposed to supply local data to the Browser.  But you could supply a page like 'taking you to application ....', and then issue a Global Event that your Application listens for.  When your Application hears the Global Event, it brings itself to the foreground. 

 

I think this should work, but be aware that I have not tried this myself. 

 

There is a sample included with your tooling. 

Highlighted
Contributor
Posts: 27
Registered: ‎06-28-2011
My Device: 9800
My Carrier: AT&T

Re: Capture URL from Browser Address bar

It only allow me to handle a specific URL, not for all URLs, Peter. It's really a problem.