Originally posted by Anuja arathi:
Hi Again,
Carlos, I was able to run a MIDLET which sends an SMS through "Run Via OTA". I feel the problem is with the MIDLET which receives SMS. Could you please run any sample MIDlet to receive SMS.
But my MIDlet which sends an SMS is stuck when i send the SMS to WMA console. If you have any sample code which is working can you send it to "r_anuja@hotmail.com". Thanks a lot .
Arathi.
You just need to create an sms connection and add a message listener
like this
connection = "sms://:4545" //some port number
conn = (MessageConnection) Connector.open(connection);
conn.setMessageListener(alistner);
When you get a message you get a message to you listener
Testing this is a bit more tricky but with WTK you can use the WMA console to send messages either text or binary. Enable the network monitor, that shows the sms coming in and out
Another simple tip is that if your MIDlet sends and receives messages you can send a message to your own number, in WTK that's typicallly +5550000
There are two examples of using WMA in Forum Nokia at
http://www.forum.nokia.com/main/1,6566,1_0_15,00.html Regards