View Single Post
Old 05-01-2007, 03:02 PM   #16
batrad
Knows Where the Search Button Is
 
Join Date: Sep 2005
Location: Princeton, NJ
Model: 9800
OS: Windows 7
Carrier: AT&T/Cingular
Posts: 48
Default

Compiled /signed this code..works great thanks.

I do have an issue that if the default browser is set to the Internet browser on the device, I'm unable to launch the Intranet URL
Is there a way to specify to use the Blackberry Browser instead of the default browser ?

Appreciate your help..just getting started with Java / RIM development

Thanks

Quote:
Originally Posted by ecarmody View Post
anyways, guruleenyc, here is a complete java app that you can compile with the BlackBerry JDE. It does require the use of a signed element for the "Browser" class element which will cost you or your company $100 to register with RIM.
You can compile run/test this in the simulator without issues, but if you try to download to a device it won't run unless its signed.

To meet all your objects, this isn't exactly a push. However, you can host the compliled application code, which is the .COD file, on your companies web server (needs MIME type set up), and then you only need to email out to your users an email with the http link to the .cod file. They do a "Get Link" in the email and the application gets installed and the icon shows on the BB desktop.

Also, for custom icon, in the JDE tool, you add an icon file to the project, right click on it and set to Application icon. Then complile the app and load to your device.

Code:
package WebLaunch;

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

public class WebLaunch extends UiApplication
{
    
    public static void main(String[] args)
    {
        WebLaunch theApp = new WebLaunch();
        theApp.enterEventDispatcher();
    }

    public WebLaunch()
    {
        BrowserSession browserSession = Browser.getDefaultSession();
        browserSession.displayPage
                ("http://www.google.com");   //or your intranet site
        System.exit(0);
    }
    
}
Regards,
Eric
Offline   Reply With Quote