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
Developer
Posts: 72
Registered: ‎04-07-2010
My Device: Blackberry 9800
My Carrier: vodafone

browserContent finishLoading() hangs on OS version 6.0 torch

[ Edited ]

Hi all,

 

I have following code in my application which hangs on Blackberry OS 6.0,which is working OK on all lower OS versions.

 

 

try {
synchronized (Application.getEventLock()) {
  browserContent = this.renderingSession.getBrowserContent(connection, "", this, e);
  if (browserContent != null) {
  Field field = browserContent.getDisplayableContent();
  if (field != null) {
  this.browserManager.deleteAll();
  this.browserManager.add(field);
  }
  // hangs in below code works fine for all other OS version <6.0
  browserContent.finishLoading();
  }
  }
} catch (RenderingException re) {
}

 

 

Please help me on this for any clue

Developer
Posts: 128
Registered: ‎11-05-2009
My Device: 9700
My Carrier: 9700

Re: browserContent finishLoading() hangs on OS version 6.0 torch

For OS 6.0,  try with BrowserField insted of browser content.

 

difference is instad of get the html/web content form rendering session, browser field directly instantiate and display the contents

 

 

Note: BrowserField introduced in OS 6.0 only.

 

 

Thanks

mindus

Developer
Posts: 72
Registered: ‎04-07-2010
My Device: Blackberry 9800
My Carrier: vodafone

Re: browserContent finishLoading() hangs on OS version 6.0 torch

[ Edited ]

Thanks mindus,

 

I have tried the BrowserField which has other issues I have other fields also on screen,these fields are loaded first then after 1/2 seconds Browserfield loaded so this gives the flickering effect i want to avoid this..any suggestion for this?

 

Note:This issue does not happen on the OS5.0 ,only hapens with OS6.0


Regards,

Himanshu

Developer
Posts: 280
Registered: ‎07-25-2008
My Device: Passport

Re: browserContent finishLoading() hangs on OS version 6.0 torch

As I've also been running into issues with the new BrowserField, I also ran into your situation.  I've actually managed to get BrowserField1 (BrowserContent) working on OS 6.0.

 

The trick is that you have to create the field on the UI thread (i.e. inside an invokeLater() call, not just in a synchronized block like you were doing), and then you have to call finishLoading() in a background non-UI thread.