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
Developer
Posts: 241
Registered: ‎11-20-2008
My Device: Not Specified

Using HTML for UI

 

Is there a way to implement the ui of an application in html in blackberry?

 

Appreciated.

 

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Using HTML for UI

Have a look at BrowserField in OS 5.0.  You can implement something similar in pre OS 5.0.

 

There is a video in it here:

http://www.blackberry.com/DevMediaLibrary/view.do?name=UnderstandingBrowserField2

 

I have never used this except as a display mechanism for information, and data collected from the Web, so I don't know if you can collect input data into your program. 

Developer
Posts: 241
Registered: ‎11-20-2008
My Device: Not Specified

Re: Using HTML for UI

 

I would like to create my application ui with html. And then I would like to be able to respond to the clicks by the user via my application.

 

I am not interested in rendering real web pages.

 

I just watched the video but it was not enough. Could you point me to any code that does something similar to what I am describing?

 

I am also targeting earlier os'es than 5.0. I would appreciate any suggestions on how to implement something similar to browser field 2. 

 

New Developer
Posts: 17
Registered: ‎10-05-2008
My Device: Not Specified

Re: Using HTML for UI

You can use a local html file. You could find a sample here: http://docs.blackberry.com/en/developers/deliverables/11958/Display_HTML_from_a_resource_within_your...

 

But it definitely need 5.0 OS.

Developer
Posts: 241
Registered: ‎11-20-2008
My Device: Not Specified

Re: Using HTML for UI

 

I am not interested in simply html rendering. I am interested in rendering and getting actions back to my app. I would like to respond to a button click etc.

New Developer
Posts: 17
Registered: ‎10-05-2008
My Device: Not Specified

Re: Using HTML for UI

I think you could use the Scriptable class. I've read it several times, but haven't tried it though.

Here's an example: http://na.blackberry.com/eng/developers/devbetasoftware/Lab_Widget_Extension.zip

This project create a BB widget, that have a html button that would vibrate the device when clicked.

AFAIK, we could use this through Scriptable class on the BrowserField. It is explained in the video as mentioned by Peter.

Developer
Posts: 241
Registered: ‎11-20-2008
My Device: Not Specified

Re: Using HTML for UI

Scriptable seems like available as of 5.0.

I need to work with earlier versions.