0

i have blackberry application and i try to display html text in a browser

i try

BrowserSession bSession = Browser.getDefaultSession();
bSession.displayPage("http://www.blackberry.com");

this page success but it display page in blackberry browser not in my own browser, and i don't need that

than i try

myBrowserField = new BrowserField();
add(myBrowserField);
myBrowserField.requestContent("http://www.blackberry.com");

this method displays error 104

and i try

BrowserFieldRequest test = new BrowserFieldRequest("http://www.blackberry.com");
BrowserField myBrowserField = new BrowserField();
add(myBrowserField);
myBrowserField.requestContent(test);

the last 2 methods

it gives no error and display empty browser but after 120 seconds it gives connection timeout

Note: i try different url but it didn't solve the problem

any help,

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
Georgian Citizen
  • 3,727
  • 6
  • 38
  • 46

1 Answers1

1

Regarding the BrowserField,

  1. If you are using a simulator, you should enable MDS-CS (Mobile Data System Connection Service) for the BrowserField to work properly (I don't know any other way). If MDS-CS is not enabled, follow this guide "Testing a BlackBerry device application with the BlackBerry Smartphone Simulator" on how to enable it.

  2. If the MDS-CS is enabled, but you are using JRE 7.0.0 (9930 simulator), then the problem is that the MDS-CS version supplied with JRE 7.0.0 is incorrect (the symptom is that the MDS-CS window doesn't show up when you run the simulator). Check my answer for "Blackberry BrowserField error in Simulator" or "Blackberry webview can not connect to internet and/or display a web page" for more details and instructions.

Hope that one of the aforementioned will work for you.

Community
  • 1
  • 1
tonymontana
  • 5,728
  • 4
  • 34
  • 53
  • how can delete mds-cs file from blackberry jre 7 file and add it from blackberry jre 6. did you know any site to download blackberry jre 6 from it i googled but i didn't find it thanks MrVincenzo – Georgian Citizen Feb 25 '12 at 07:58
  • @mbayloon Delete `EclipsePath\plugins\net.rim.ejde.componentpack7.0.0_xxx\components\MDS` and replace it with this MDS `EclipsePath\plugins\net.rim.ejde.componentpack6.0.0_yyyy\components\MDS`. Restart Eclipse before rerunning the application. `EclipsePath` is your path to Eclipse, usually `c:\eclipse`. – tonymontana Feb 25 '12 at 08:47
  • in eclipse path i have \plugins\net.rim.ejde.componentpack7.0.0_xxx\components\MDS. but i don't have \plugins\net.rim.ejde.componentpack6.0.0_yyyy\components\MDS to replace with. (i don't have this file componentpack6.0.0_yyyy) if you have it can uou send it to my email (mbayloon@gmail.com) thanks MrVincenzo – Georgian Citizen Feb 25 '12 at 09:04
  • You can install JRE 6.0.0 via the BlackBerry's update site. Follow [this guide](http://us.blackberry.com/developers/javaappdev/javaupdate.jsp) to lear how – tonymontana Feb 25 '12 at 10:48