| Reply | « Previous Thread | Next Thread » |
|
Hi All,
In the Nokia N79 device i have installed & using a midlet which uses the Platformrequest(). To the platformrequest() a proper HTTP URL is passed. Sometimes the midlet gets hanged before exactly making the platform request. Even sometimes it invokes the browser & shows the content, now when i come back to the Midlet the midlet is getting hanged. This happens only in rare scenario. Please provide u'r inputs in solving this issue. Regards, Sakthivel |
| Mr.Bond007 |
| View Public Profile |
| Find all posts by Mr.Bond007 |
|
What do you do immediately after the platformRequest() call?
What is on the screen at the time? (Form, List, Canvas, etc?) Cheers, Graham. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
I don't know exactly what you have in your code but you need to check what it returns. If it returns 'true' then your midlet must be closed after.
Code:
if (parent.platformRequest(URL)) {
parent.destroyApp(true);
parent.notifyDestroyed();
}
|
|
Join Date: Mar 2008
Posts: 2,161
Location: The Capital of I N D I A
raj_J2ME
Offline
Forum Nokia Champion
|
|
Hi,
Do you have any thread running in that code.... Can you put the the code that you are using for the underlined task.. Thanks R a j - The K e r n e l |
|
Quote:
Yes my code contains few threads. So you mean to say threads are the root cause for this problem |
| Mr.Bond007 |
| View Public Profile |
| Find all posts by Mr.Bond007 |
|
Quote:
I tried to find that also..i am trying to print the status of the platformrequest() but unfortunately before this statement itself the midlet got hanged. |
| Mr.Bond007 |
| View Public Profile |
| Find all posts by Mr.Bond007 |
|
Quote:
I am using Canvas on the screen. i am not doing any specific operations after platformrequest() call. |
| Mr.Bond007 |
| View Public Profile |
| Find all posts by Mr.Bond007 |
|
Join Date: Mar 2008
Posts: 2,161
Location: The Capital of I N D I A
raj_J2ME
Offline
Forum Nokia Champion
|
|
Please check by stopping the thread,and then call the plateformRequest()..
Thanks R a j - The K e r n e l |
|
I am having exactly the same problem with Bond007. Midlet hangs(the whole phone hangs actually) after closing the browser and returning to the midlet from which the platFormRequest which opened the browser was called. In my own case, I have no intention of shutting down the midlet after the platformRequest() call. I need the user to be able to return gracefully to the midlet after exiting the browser. Problem only occurs on E71 for certain URLs, it has worked okay on several other handsets and URLs.
The code is just a simple call MyMidlet.platformRequest(url); amongst other things. A canvas was on screen prior to this call and the same canvas is met on screen when user exits browser. What is this thing about stopping the thread? Do you mean the UI animation thread or the thread that makes the platformRequest call, how will this help?
Last edited by niyioyelade : 2009-04-21 at 17:04.
Reason: Additional info
|
| niyioyelade |
| View Public Profile |
| Find all posts by niyioyelade |
|
On some devices, you must exit the application after a call to platformRequest(). If platformRequest() returns true, then the request will not take effect until you exit. (As in the code posted by Unit1ed above.)
I suggest you build a minimal MIDlet, with just a Form, to Commands (one to trigger the platformRequest() and one to exit), and nothing else. No threads. Like: PHP Code:
Graham. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
well i had tried with the small piece of code shown below. I havent face any problem like hanging of midlet. \my teting device is sony ericsson k790i. well might be some other issue. please put ur code here if quite possible..
Code:
import javax.microedition.io.ConnectionNotFoundException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class testMidlet extends MIDlet implements CommandListener{
Form form;
Command ok;
private Display d;
public void startApp() {
d = Display.getDisplay(this);
form = new Form("");
ok = new Command("OK",Command.OK,1);
form.addCommand(ok);
form.setCommandListener(this);
d.setCurrent(form);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command c, Displayable d)
{
if(c == ok)
{
try {
this.platformRequest("www.google.com");
} catch (ConnectionNotFoundException ex) {
form.append(""+ex.toString());
ex.printStackTrace();
}
notifyDestroyed();
destroyApp(true);
}
}
}
thanks, jitu_goldie.. KEEP TRYING.. |
| jitu_goldie |
| View Public Profile |
| Find all posts by jitu_goldie |
|
Hi,
Hanging prob. should not come if u r calling platformRequest after closing the threads and destroy midlet. May be its your handset problem check same on other devise. |
| sharvan1981 |
| View Public Profile |
| Find all posts by sharvan1981 |
|
as far as I can understand he DOESN'T want to destroy his midlet ;) he wants to "gracefully return to it", whcih would be quite difficult if the midlet got destroyed ;)
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| invoking HTML pages from MIDlet | kumar_m16 | Mobile Java General | 2 | 2008-04-24 14:26 |
| Platform Request used for updating existing midletsuite? | hlothman | Mobile Java Networking & Messaging & Security | 5 | 2007-01-22 21:41 |
| Midlet vanishes after HTTP request | rputhli | Mobile Java General | 0 | 2005-10-03 00:56 |
| platform request on nokia 6600 | scheung3 | Mobile Java General | 0 | 2004-10-14 00:56 |
| Invoking WAP browser from midlet | kljajo | Mobile Java Networking & Messaging & Security | 7 | 2004-07-14 04:03 |