03-18-2010, 05:33 AM
|
#1 (permalink)
|
Knows Where the Search Button Is
Join Date: Dec 2009 Model: 7100T PIN: N/A Carrier: java
Posts: 31
Post Thanks: 0 Thanked 0 Times in 0 Posts
| SMS sending : NullPointerException Please Login to Remove! Hello to all,
i am working on one applicaion in which i have to send SMS through programme but whenever i am using the below code to send the message then i am getting the NullPointerException on Invoke.invokeApplication method.
TextMessage msgout;
MessageConnection msgcon;
msgcon = (MessageConnection)Connector.open("sms://");
msgout = (TextMessage) msgcon.newMessage(MessageConnection.TEXT_MESSAGE);
msgout.setAddress("sms://15198887465");
msgout.setPayloadText("I am busy. Call u later");
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
new MessageArguments(msgout));
msgcon.send(msgout);
can anybody tell me that what is the problem.
with thanks and regards
Shakeel |
Offline
| |