• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2ME application sends SMS only to java supported mobile phones

 
Imdad Soomro
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made a J2ME application which sends SMS only to java supported mobile phones. Can anyone tell me what could be the problem? Thanks
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18102
51
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea. If you're truly sending an SMS, it should be receivable by any SMS-capable phone. Certainly my old Windows Mobile phone had no problems.
 
Imdad Soomro
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really don't know. SMS gets received on some mobiles successfully. On some mobiles, it is received but doesn't get displayed and says "Message can not be displayed". On some mobiles it is not received at all.
Following is the code i am using to send the message.

public void send(String no, String mess){
try{

String num=no;
String msg=mess;
String address = "sms://"+num+":50000";
MessageConnection smsconn = null;
smsconn = (MessageConnection) Connector.open(address);
TextMessage txtmessage = (TextMessage) smsconn.newMessage(MessageConnection.TEXT_MESSAGE);
txtmessage.setAddress(address);
txtmessage.setPayloadText(msg);
smsconn.send(txtmessage);

smsconn.close();



}catch(Exception ex){}


}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic