HTTP MIDP connection

Hi there, I have an MIDP application which demonstrate the HTTP connection, run on the Java wireless toolkit Emulator, but when it connects it shows the HTML codes of the site,,,is there anyway i can change that so it actually shows the site? any suggestion is much
[299 byte] By [A-Uka] at [2007-10-3 11:28:59]
# 1
No, Midp is not a web browser. If you want to browse the web, use a webbrowser. You can call a webbrowser from midp though, though a platformreqest.
deepspacea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

Use html parsers which will give you the html code and then you use thiese tags in paint of your canvas to paint according to those tags

e.g. html tag is

paint your string onto the next line like that

I mean you have to create the web browser for your own and define the implementation for tags thats it

thus you can see the web site in your phone

but majorly you will face memory and processing(connection) problems for that use high configuration phones

..........and many more...........

@rjun

arjunamatea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
You use http connection usually when you want to send/receive message to/from a server. To view web pages follow deepspace's advice, so that you will open the phone's web browser directly from the application.Mihai
Printisora at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

Yeah sure, I aggree but only for wap(.wml) pages and for html pages your request should pass through WAP gateway(which converts html pges to wap pages till some extent) and J2ME tries to connect to server directly not through the gateway(not just like wap browser).

so if you are reading html pages through your j2me application will get html tags which cannot be viewed in WAP browser.

am I right?

@rjun

arjunamatea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

> so if you are reading html pages through your j2me

> application will get html tags which cannot be

> viewed in WAP browser.

Who cares. There is no WAP brower in J2me, and neither a HTML browser. A platformrequest just starts the browser on the phone, and will not use any j2me stuff when it is started.

deepspacea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6

>There is no WAP brower in J2me, and neither a HTML browser.

Yes thats true, but we are discussing about opening website in j2me application so that there will be controll over the application. After calling platformRequest the respected application(JAM/WAP browser etc) is responsible for further controll and you cannot return back to originating j2me application but if you want full controll over j2me application you have to use customized web browser ie by using html/xml parser and render by j2me low apis thats only the solution.

@rjun

arjunamatea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 7

> but if you want full controll over

> j2me application you have to use customized web

> browser ie by using html/xml parser and render by

> j2me low apis thats only the solution.

Then forget WAP and HTML and use your own custom XML format to create form form and controls from web content. much simpler to do, and far more efficient.

But at first, check if you really need all that. In most cases, you don't

deepspacea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 8

>But at first, check if you really need all that. In most cases, you don't

Actually I have my clients requirement that after some downloads/surfing he(user) should again come to his(clients) home page there is no way to do this in j2me i.e. after calling platformRequest() wap page will open but after exiting wap browsing your application is not launched automatically that you have to do manually. even resumeRequest() too.

ie

platformRequest(url);

resumeRequest();

will not take the midlet in active state

@rjun

arjunamatea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 9
Probably not, because the MIDlet is in the pause state I presume. So you can set some timer there and wake the MIDlet up.Mihai
Printisora at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 10

No, I cannot determine how much time the exernal application(like WAP browser) will take, and when u call platformRequest() the midlet is destroyed not enters in paused state. I tried platformRequest() on nokia series where midlet is destroyed after calling the platformRequest() even I tried with running the platformRequest in another thread but after calling platformRequest JAM calls the destroyApp *** destroyApp(true) so the thread in which platformRequest is running is also killed and no WAP browser is opening is there any other remedy for this?

@rjun

arjunamatea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 11
Couldn't you register an Alarm using PushRegistry, at the time you call the platformRequest method, and thus make your MIDlet wake up after a certain amount of time? Mihai
Printisora at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 12
... and what if user is still surfing in WAP browser? it will stop it and shows the midlet. actually I want when user closes the WAP browser then automatically midlet should be started. @rjun
arjunamatea at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 13

You initially said: "Actually I have my clients requirement that after some downloads/surfing he(user) should again come to his(clients) home page there is no way to do this in j2me", thus my last post.

What you want can't be done with J2ME as far as I know, because the AMS has no control over what you do in your browser. Maybe some OS specific functions can help you with this, but you would have to search a little about it, and it would certainly not be a universal solution.

Mihai

Printisora at 2007-7-15 13:55:20 > top of Java-index,Java Mobility Forums,Java ME Technologies...