WTK 2.5 hangs

Hi,

In my work place we work with WTK22, but it doesn't have emulation classes for jsr 179 and 82, which is a must for me, so i tried WTK25.

it has a problem though.

every time i run the emulator and creates external event (sms\Location request the emulator displays an Alert screen that asks if to allow the communication, but there is hangs.

I run it with EclipseMe and paused the threads only to find out they are all in wait state :-/

Bug ? misconfiguration on my behalf ?

[514 byte] By [poohTbeara] at [2007-11-26 23:42:08]
# 1
Does it continue to hang after a positive answer for permission request?
Tigra321a at 2007-7-11 15:10:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

I have faced a same problem earlier. My program structure was as follows:

1. When a user selects a command key after editing a message the commandAction function is fired.

2. I was sending the sms from that function. And it was hanging after the alert.

The error was that, sending and message outside (using GCF) is not allowed from the commandAction event. (I don't know why). So I created a new thread in that commandAction event and then from the run method of that thread I sent that sms, and it is working fine. The structure of the program must be:

public class MyMidletClass extends Midlet implements CommandListener,Runnable {

//.... all your stuffs here

public void commandAction(Command c, Displayable s){

//Check if it is required to send SMS then do the following below

new Thread(this).start();

}

public void run() {

//Here will be the code for sending SMS..

}

}

Hope it helps :)

diptaPBa at 2007-7-11 15:10:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
Definitly! Network operations (including SMS messaging) should be handled in different thread, then commandAction...
Tigra321a at 2007-7-11 15:10:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4
hi i would like to develop application "consulting of account bank with mobile" so i would like to do server with J2se et client whith J2ME soplz help me who i can simulate the result in the pc (whithout connecting pc and mobile)plzzzzzzzzzzzzzzzzzzzzzzzzzz help
ha_abir@yahoo.fra at 2007-7-11 15:10:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5
You can use sun WTK to simulate the J2ME app in PC
diptaPBa at 2007-7-11 15:10:41 > top of Java-index,Java Mobility Forums,Java ME Technologies...