Jinesh
Jinesh

Reputation: 841

How to create a browser window in J2ME?

How can i create a browser component in J2ME which can display web pages inside an application? Is there any API available for this ? or is this really possible ?

Upvotes: 6

Views: 9910

Answers (7)

JaakL
JaakL

Reputation: 41

My experiences:

  1. J2MEPolish has HTML browser. It costs 990EUR per app and you need to use J2MEPolish to use it. But be warned: their HTML browser has many issues, it supports forms and other advanced elements, but if you try to get something you like then rendering quality is bad (e.g. no spacing, defaults to center view etc). Free evaluation/GPL is available.
  2. PocketLearn J2ME HTML Component - http://www.j2mehtml.com/ seems to have less features but much better rendering quality. This is not free as well, and there they do not provide any useful evaluation download or public license fee info.
  3. J2ME cHTML browser is free and open source, but no docs (and probably no quality too)

Upvotes: 4

Felipe
Felipe

Reputation: 21

Try this http://sourceforge.net/projects/fire-j2me/

Upvotes: 2

Lena Schimmel
Lena Schimmel

Reputation: 7493

As far as I know, the only browser written in J2ME is Opera Mini (not to get confused with Opera Mobile, which is a different thing). It runs amazingly good even on very low end phones, but most of the HTML handling is done on a special server that Opera hosts, and the client gets optimizes, preformatted, binary data to display.

Doing everything on the phone using Java might be hard or even impossible. You'd be able to code up a browser that displays very basic HTML pages, but doing it right even for more complex pages seems to be impossible on J2ME because of the limited memory and CPU.

I could imagine that some high end phones come with a custom API to embed a native browser into you Midled, but the standart J2ME definitely does not have this.

Upvotes: 2

Basie Kok
Basie Kok

Reputation:

You can try htmlBrowser component of the j2mePolish toolkit (www.j2mepolish.org)

Upvotes: 0

darius
darius

Reputation: 4987

Unfortunatley there are no built-in components in Java ME to render html.

Upvotes: 1

michael aubert
michael aubert

Reputation: 6826

The Content handling API is what you're looking for.

That's JSR 211.

Unfortunately, to do what you want, you would need to find a handset that contains an implementation of JSR211 that is both complete and correct.

That doesn't exist yet as far as I know.

The only J2ME emulator that I know that may allow you to launch a web browser window (outside of a MIDlet) is the Nokia Series60 emulator. That doesn't have a complete implementation of JSR 211.

Upvotes: 2

Maurice Perry
Maurice Perry

Reputation: 32831

The only portable way to display a web page in the browser is with:

MIDlet.platformRequest(String URL);

On some mobile, this will terminate the J2ME application though.

Upvotes: 2

Related Questions