Hello ,
I m triing to send message by using jsr 205_2.0 wireless messaging API on Nokia c2-03 but it fails to send
My code:
public string sendMessage(data, mobno)
{
String smsPort="16050";
String address = "sms://+"+"mobno" + ":" + smsPort;
String msg=data;
MessageConnection smsconn = null;
try
{
smsconn = (MessageConnection) Connector.open (address);
TextMessage txtmessage =
(TextMessage) smsconn.newMessage (MessageConnection.TEXT_MESSAGE);
txtmessage.setAddress (address);
txtmessage.setPayloadText (msg);
smsconn.send (txtmessage);
}
catch (Throwable t) {
System.out.println ("Send caught: ");
t.printStackTrace ();
return "FAILED";
}
return "SUCESS";
}
Is there any problem with port no.
I hav tried port no 5000 as well but not working ..
Thank u

Reply With Quote

