Originally posted by Olivier Houyoux:
That's what I meant.
Could you post or send me your code so that I can check a little bit further.
And by the way, what dev environment are you working on and what kind of mobile phone do you use to test your app ?
I'm working with eclipse and wtk2.5 on CLDC 1.1 and MIDP 2.1.
My code is huge so i can post only a part..
There are two connections open with a MessageListener for each one:
if(mmsCon1==null){
try {
mmsCon1 = (MessageConnection) Connector.open("mms://:"+appId);
mmsCon1.setMessageListener(this);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void notifyIncomingMessage(MessageConnection conn) {
// Callback for inbound message.
// Start a new thread to receive the message.
System.out.println("Notify for mms");
thread=new Thread(this);
thread.start();
}
and in an other class...
try {
smsCon1 = (MessageConnection) Connector.open("sms://:"+smsPort);
this.smsCon1.setMessageListener(this);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
public void notifyIncomingMessage(MessageConnection arg0) {
System.out.println("New sms recerived");
thread=new Thread(this);
thread.start();
}
i didn't post the run methods because it's not a thread problem...notifyIncomingMessage is not even called.I also tried to have a single listener for both connections but nothing..