06-28-2012 01:35 PM
I tried the following code on a BlackBerry Bold 9780 running 6.0 bundle 872 (18.104.22.1689) and it worked fine. What application/bundle version are you using? Can you upgrade that device?
MainScreen mainScreen = new MainScreen(); BrowserFieldConfig config = new BrowserFieldConfig(); HttpHeaders headers = new HttpHeaders(); headers.addProperty(HttpHeaders.HEADER_CONTENT_TYP
E, HttpHeaders.CONTENT_TYPE_TEXT_HTML); headers.addProperty(HttpHeaders.HEADER_ACCEPT_CHAR SET, "UTF-8"); config.setProperty(BrowserFieldConfig.HTTP_HEADERS , headers); BrowserField contentField = new BrowserField(config); mainScreen.add(contentField); contentField.displayContent(htmlText,""); pushScreen(mainScreen);
07-05-2012 05:34 AM
I just noticed that It works sometimes. The code is exactly the same. I haven't changed anything. The text is shown perfectly well. But sometimes when I restart the device, It stops working. Nothing displays on the screen. I put the whole code in the try catch block. No exception is occurring, the text is right too.. But it does not show anything. What could be the possible reason ?
07-09-2012 02:34 PM
Can you post a snippet from the event log taken after this fails that shows the application being launched (and some lines after)? You can extract an event log using the following command.
javaloader -u eventlog > mylog.txt