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
New Developer
Posts: 30
Registered: ‎09-20-2012
My Device: BlackBerry Curve 8330
My Carrier: vodafone
Accepted Solution

Reg BrowserField Navigation Problem

Hi All,

          I am opening url using browser field. now if i clicked on any hyperlink or any menu options, i need to get the url and based on the url i need to navigate some other custom screen. How to implement these thing. If anybody knows then plz reply me...

 

Thanks and Regards,

S.Seshu

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Reg BrowserField Navigation Problem

Hi @

 

You can try and Implement a BrowserFieldController:

http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/browser/field2/BrowserFieldCon...

 

Another option is to over the ProtocolController:

http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/browser/field2/ProtocolControl...

 

In both case, you would have to notify your browserField to use your own class so you would have to use BrowserFieldConfig API.

 

Hope that helps,

 

E.

 

New Developer
Posts: 30
Registered: ‎09-20-2012
My Device: BlackBerry Curve 8330
My Carrier: vodafone

Re: Reg BrowserField Navigation Problem

Hi Maadani,

        Thanks for the reply... i got the solution. Do u know how to compare the given word is in the url or not?? In Java we ll use compare method for whether the string contains specified string or not?? In Blackberry contains method is not there. So how can we check two strings.

Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Reg BrowserField Navigation Problem

indexOf(...) != -1

Highlighted
New Developer
Posts: 30
Registered: ‎09-20-2012
My Device: BlackBerry Curve 8330
My Carrier: vodafone

Re: Reg BrowserField Navigation Problem

Thanks maadani,

   Its working f9 nw