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
Developer
Posts: 174
Registered: ‎08-20-2008
My Device: Not Specified

BrowserSession visit = Browser.getDefaultSession() error

Hi All,

 

I'm getting an error when using the displaypage method. I'm using a FilterBaseInterface, when a URL is passed and certain parameters aren't correct some static HTML is passed instead of the actual page (similar to the precanned example). The user is prompted to correct these background parameters on a FullScreen and once entered an attempt is made to reopen the page as below.

 

BrowserSession visit = Browser.getDefaultSession(); visit.displayPage(urlToGo);

This works fine, however if the user once again inserts the incorrect parameters, the FullScreen prompts them once again then another attempt is made to reopen the page. When trying to reopen the page the following error occurs on the browser.

 

A communication failure occurred with the selected Mobile Data Service. The server may be busy, please try again later. If the problem persists contact your administrator.

 

I have looked closely on the MDS logs and no attempt to contact the MDS server is made. If you click OK to this error message and select Refresh from the browser menu the user is prompted by the FullScreen but the error occurs on the next displayPage attempt. However if you select Go To... from the browser menu and select the exact same URL, once again the FullScreen prompts the user but on the next displayPage, unlike the refresh, no error occurs until the next time a displayPage attempt is made.

 

 

 

 

 

 

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: BrowserSession visit = Browser.getDefaultSession() error

Can you give an example of the valid and invalid parameters you mention?  What BlackBerry model and handheld software version are you testing on?  You can find this under Options, About on the BlackBerry handheld.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 174
Registered: ‎08-20-2008
My Device: Not Specified

Re: BrowserSession visit = Browser.getDefaultSession() error

Thanks for replying mark. I have put a work around on this that actually works better than the way I originally wanted to do this. Cheers