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

Web and WebWorks Development

Reply
New Contributor
tseades
Posts: 8
Registered: ‎02-28-2011
My Device: Blackberry Bold
My Carrier: Verizon

Re: Issue with Blackberry Browser with 6.0 os - tabbed brower

My issue is that I need to use the blackberry browser as I am having to access an internal server (inside of the firewall) thats not accessable from the default browser.

 

I do thank you, as I am getting to the point that i will try anything.

Please use plain text.
New Contributor
tseades
Posts: 8
Registered: ‎02-28-2011
My Device: Blackberry Bold
My Carrier: Verizon

Re: Issue with Blackberry Browser with 6.0 os - tabbed brower

I just tried adding this change to my web icon and it almost worked.  The page tries to load, but it comes back with a page can not be found (as it should since its not accessible outside of the firewall).  I know in the new os 6.0, blackberry directs if the site needs to use the web browser or the blackberry browser (or go through the bes), but is there a way to tell it what to use?

Please use plain text.
New Contributor
manielsen2002
Posts: 5
Registered: ‎03-14-2011
My Device: Bold 9650
My Carrier: Verizon

Re: Issue with Blackberry Browser with 6.0 os - tabbed brower

I believe the only way to tell it to do that is with the BES_BROWSER constant.  I will do some more testing today to try another option.  I did also look around on the BES server itself and could not find a browser setting regarding the default home page that it is loading but I would think it has to be somewhere.

Please use plain text.
New Contributor
manielsen2002
Posts: 5
Registered: ‎03-14-2011
My Device: Bold 9650
My Carrier: Verizon

Re: Issue with Blackberry Browser with 6.0 os - tabbed brower

I switched back to using BES_BROWSER constant and then changed the following code in WebIcon.java.

 

public void launchBrowser(int browserType, String url)
    {       
        BrowserSession browserSession = createBrowserSession(browserType);       
        String version = DeviceInfo.getSoftwareVersion();       
        if (version.startsWith("6.")) { // version 6 OS
          browserSession.displayPage(url);
        } else {
          browserSession.displayPage(url);                      
          browserSession.showBrowser();           
        }                    
    }

 

You could also just remove the chowBrowser line completely it seems.  Although I don't know what that would do to older os's.

 

Hope this helps.

Please use plain text.
New Contributor
manielsen2002
Posts: 5
Registered: ‎03-14-2011
My Device: Bold 9650
My Carrier: Verizon

Re: Issue with Blackberry Browser with 6.0 os - tabbed brower

you will have to add this import if you want to check the os version.

 

import net.rim.device.api.system.DeviceInfo;

 

at the top under the package line.

 

package com.yourcompany.WebIcon;

 

import net.rim.device.api.system.Application;
import net.rim.blackberry.api.browser.BrowserSession;
import net.rim.device.api.system.DeviceInfo;

Please use plain text.
New Contributor
tseades
Posts: 8
Registered: ‎02-28-2011
My Device: Blackberry Bold
My Carrier: Verizon

Re: Issue with Blackberry Browser with 6.0 os - tabbed brower

So far so good!  This looks to have worked.  Just have to test on some older os.

 

Thanks so much!

Please use plain text.