Anyone who has tried to use BrowserField or RenderingApplication on Blackberry 4.6 and 4.7 has probably run into this: you implement an embedded browser field in your app, and notice that the pages that render in your application look like crap, but when viewed under the regular browser everything looks normal.
Well, as it turns out, BrowserField (4.6 and 4.7) and the full blown Browser app use two different rendering engines.
So, what is one to do? Suffer in silence? Rage against the night?
Nope. Do this:
// When setting the properties for your rendering session use this
// undocumented bit of magic
_renderingSession.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, 17000, true);
This little undocumented gem now makes your embedded browser field use the same rendering engine as the browser.
If you’re using 5.0, the new BrowserField2 is the way to go. Different article for a different day.
I’m not sure why it seems like every common thing you want to do on Blackberry has to be a total hassle.
But I’m hoping this little jewel will help the next guy down the road spend a lot less time trolling the wilds of StackOverflow and the Blackberry Forums, and more time finishing their project.