You can send sms using j2me code by following code
String address = "sms://" + destinationAddress;
MessageConnection smsconn = null;
try {
/** Open the message connection. */
smsconn = (MessageConnection)Connector.open(address);
TextMessage txtmessage = (TextMessage)smsconn.newMessage(MessageConnection.TEXT_MESSAGE);
txtmessage.setPayloadText(destinationMessage);
smsconn.send(txtmessage);
}
catch(Exception e) {
e.printStackTrace();
}
Thanks mihir,
ReplyDeleteI found this code very useful to send me sms for my application .
But whenever i send sms it ask for conformation so user must need interaction with application but i want to send sms without user interaction at some time interval . Is there any solution to send sms without that conformation.