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: 22
Registered: ‎07-14-2008
My Device: Not Specified

Re: Opening the browser

There's not a push screen anywhere in the code, so I don't think I can pop the screen to fix this issue.  Got any other suggestions?  Here's the code again...

 

import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
import net.rim.device.api.ui.UiApplication;

public class appshortcut extends UiApplication {

public static void main(String[] args){
appshortcut instance = new appshortcut();
instance.enterEventDispatcher();
}

public appshortcut() {
BrowserSession site = Browser.getDefaultSession();
site.displayPage("http://www.google.com");
System.exit(0);
}


}

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

Re: Opening the browser

There wouldn't be a screen for your application to pop here.  It should simply launch the browser and exit (leaving the browser running).

 

Are you still seeing the "Requesting" page after pressing the hangup key?  Are you able to reproduce this on any other BlackBerry handheld software versions?

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: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Opening the browser

If this is the problem I described, failure to show a page until user hits thumbwheel on other-than-

first browser hit, I can confirm that naive code and the servicebook example will manifest the problem

in some cases. AFAIK, this is a problem with 4.2.x that finally went away when we copied the rim

code with absolutely none of our own. In fact, the 3.x code seems to crash a 4.x blackberry requiring

power cycling to recover.

 

I was relying on someone else to test and sometimes there are problems with stale versions etc but

the last thing I changed before this went away was invoking a screen to invoke the browser.

 

Perhaps you need to use the servicebook code from the example and pick the right browser.

 

New Developer
Posts: 22
Registered: ‎07-14-2008
My Device: Not Specified

Re: Opening the browser

I have not tried it on other software versions.  I have tried it on multiple 8310's with 4.2.2.170 and got the same results.  I will try to reproduce this on another software version tomorrow.

 

When you say servicebook code... are referring to the sample code that is posted on this website?  If not, do you have a link to the code?  Thanks again for all your help!

New Developer
Posts: 22
Registered: ‎07-14-2008
My Device: Not Specified

Re: Opening the browser

Just for the record, I tested this problem on an 8700c with 4.1.0.194 and it did not occur.

 

I tested it on a 8800 with 4.2.1.79 and it did occur.

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

Re: Opening the browser

Is this happening on multiple BlackBerry 8800's running 4.2.1.79 or just a particular device?  If it is just the single device, what IPPP servcie books are listed?  You can veiw these by going to Options, Advanced Options, Service Book.
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
New Developer
Posts: 4
Registered: ‎08-13-2008
My Device: Not Specified

Re: Opening the browser

Is anyone aware of a way to invoke the browser from a MIDlet that does not prompt the user (all I've seen are UiApplication examples)?  I've tried both platformRequest() and BrowserSession implementations.  Both function, but both are also prompting me before opening the browser. 

 

I made a quick sample app in the JDE using the UiApplication framework and it *did not* seem to prompt, which makes me wonder if there is a way around this for MIDlets or is this an inherant disadvantage to using MIDP for BlackBerry development?

 

Thanks in advance!

Matt

New Developer
Posts: 22
Registered: ‎07-14-2008
My Device: Not Specified

Re: Opening the browser

Hey the way I finally resolved all of my issues is was by using the BlackBerry Bulk Push application.  I would try to use that.  It is a small app that you provide with parameters:

 

BB server / port number (8080) / BB PIN or email address

 

then you simply give the URL you want to push to your device and a URL to the icon you want to push with it.  It works great!

New Developer
Posts: 4
Registered: ‎08-13-2008
My Device: Not Specified

Re: Opening the browser

Thanks for the quick response!  Yeah, Bulk Push is very cool Smiley Happy

 

Unfortunately, I'm trying to do something a little different.  I have an existing application that displays URLs as part of its search functionality (and in a few other places).  I'd like to be able to invoke the browser from this application using a search result's URL.  The only issue I have right now is with the "application is attempting to invoke the browser" prompt.  If there is any way around that from a MIDlet-based application, that would be ideal.  But at this point, it looks to me like I can't get around this without refactoring the entire app to use UiApplication rather than MIDlet.

 

So if anyone knows of a way around this in MIDP it will save me a great deal of trouble and I will be forever grateful! Smiley Very Happy

Highlighted
New Developer
Posts: 20
Registered: ‎10-29-2008
My Device: Not Specified

Re: Opening the browser

Hello,

 

I am also facing same problem, I have a midlet application ,  which is running perfectly fine on many blackberry phones.

I am facing problem on Blackberry 8830 curve while openning browser from Application.

when I am openning browser  (via platformRequest(url)) It launches browser but before this its pop up multiple alerts, with same message.

how to avoid these multiple alerts.

 

Thanks

Sudha