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

Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Field information from BrowserContent.getDisplayableContent()


I'm using BrowserContent to write a custom browser. Apparently the individual fields are usually

being handled appropriately as I get menu options appropriate for the field like "getlink" or image

specific stuff. But, it isn't clear to be how to investigate the field type and contents to make

my own features like copying the text or links or source html to a clipboard etc.


What can I do with these fields in terms of class determination and manipulation?  

Is the best that I can do to go through the component package and do "if instanceof " or

otherwise try to cast into various things or is there a simpler way?  Presumably there is

an underlying instance of XMLParser for rendering html. Do I have anyway to access this?




Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Field information from BrowserContent.getDisplayableContent()

If I execute this code,

BrowserContent bc=m_app.this_page();
       if ( bc==null) return;
       String cname= bc.getClass().getName();
       dshow("name is "+cname);



I get something called HTMLBrowserContent for the page I'm viewing but it doesn't appear in allclasses AFAIK

as it is in apps.internal.browser which doesn't exist in my documentation. Comments?


Further, this test seems to fail leaving me out of ideas. Thanks 


if ( bc instanceof Manager)







BlackBerry Development Advisor
Posts: 15,871
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Field information from BrowserContent.getDisplayableContent()

The browser fields do not provide any APIs for directly accessing the content that is being rendered (HTML, etc...).


Classes and methods that are not listed in the JavaDocs should not be used by third party applications.  These are internal and could change at any time.  Using them can also trigger the '3' key signing requirement (an internal RIM key) and result with an application that can not be run on a real BlackBerry.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.