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
New Developer
dhomick10
Posts: 6
Registered: ‎05-07-2009
My Device: Not Specified

Access HTML from BrowserFieldSampleApplication

Hi All,

 

Is there a way to access the raw HTML that the browser is attempting to render in the BrowserFieldSampleApplication.  Either as it loads or after it completes the loading process.  Either would work for me.

 

I can't seem to figure out a way to hook in and access this information.  Currently, we embed a couple of meta tags in the html that describe the page that is being rendered.  On the iPhone or Android, when the page has completed rendering, we access the DOM of the HTML via the webview and read these values in.  I am trying to achieve something similar on the BlackBerry where after the webpage completes loading, I access the html and parse around until I find the meta tags, but I can't figure out a way to get a hold of the HTML since it is loaded via an input stream outside of my control.

 

Any pointers on how to achieve this would be great. 

Please use plain text.
Visitor
l_python
Posts: 1
Registered: ‎06-11-2010
My Device: Black Berry 9500
My Carrier: Developer

Re: Access HTML from BrowserFieldSampleApplication

yes, i have in trouble like that. on the blackberry platform, why i can't get html any DOM info from the embedded browser.

Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Access HTML from BrowserFieldSampleApplication

Was anybody successful in it, I am also looking for a similar solution?

----------------------
Press like if you find a message helpful
---------
Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Access HTML from BrowserFieldSampleApplication

A way might be to fetch the html on your own and provide a custom httpconnection implementation with that html to the browserfield. I am trying to do one, but looks like the css and other formats are getting messed up

----------------------
Press like if you find a message helpful
---------
Please use plain text.
New Developer
dhomick10
Posts: 6
Registered: ‎05-07-2009
My Device: Not Specified

Re: Access HTML from BrowserFieldSampleApplication

I was not able to get this working for me.  I did consider the custom http connection approach and thought it might work, but ultimately, my project changed directions to being a native app and I did not need to implement it.  Good luck with that approach and if it works for you, please update the thread.

Please use plain text.
Developer
raquibulbari
Posts: 137
Registered: ‎09-30-2009
My Device: Torch 9800

Re: Access HTML from BrowserFieldSampleApplication

ok :smileysad:

----------------------
Press like if you find a message helpful
---------
Please use plain text.