Hi I'm new in Blackberry app development i want to load HTML in browser field.. I'm able to load HTML for version 5 ,and 6 and more but it not loading in OS version 4
plz tell me how to load this HTML on Blackberry OS version4.6 i m using Eclipsed to developing application on 5 and 6 works properly but in 4.6 not plz tell me how to write. Code for this or any specific change in code or we cant load HTML in OS version 4.6?
BrowserField mybroBrowserField=new BrowserField();
add(mybroBrowserField);
mybroBrowserField.displayContent(
"<html><body><h1>hello world! This blackbery apps</h1> </body></html>",
"http://localhost");
this code apply for 5 and more than 5 version but not work for OS version 4
You can show your html document in this way
If you are using BlackBerry Eclipse Plug-in to develop BB apps, you can import sample BlackBerry projects. In the list there is something like BlackBerry Browser Field Demo. Just import that and find out how this works.
Insert this snippet to Utilities class
and call this instead of
makeConnection(String url, HttpHeaders requestHeaders, byte[] postData)
method.BrowserField exist only since BlackBerry API 5.0.0, but you can use this custom BrowserFieldRenderer class from LogicMail to solve your problem