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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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

Field information from BrowserContent.getDisplayableContent()

Hi,

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?

 

Thanks.

 

Developer
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)
       {

 

 

 

 

Thanks.

 

BlackBerry Development Advisor
Posts: 15,888
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.