| View previous topic :: View next topic |
| Author |
Message |
maruffaiz
Joined: 16 Feb 2009 Posts: 18
|
Posted: Sun Apr 12, 2009 10:34 am Post subject: Sending SMS to other mobile geting exception as java.lang.IllegalArgumentException URGENT PLEASE!!! |
|
|
Hi,
Good Day!
I am creating an application for sending SMS to other mobile (Without port).
That application is working fine in emulator.
But when I am installing on mobile (Nokia N73) it is throwing exception as "java.lang.IllegalArgumentException" while sending the SMS.
The code is as follows:
public void run ()
{
try
{
String addr = "sms://+dest.getString();
MessageConnection conn = (MessageConnection) Connector.open(addr);
TextMessage msg = (TextMessage) conn.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setPayloadText("Test");//textMesg.getString());
conn.send(msg);
Alert a = new Alert("Success!","Message sent successfully", null,AlertType.INFO);
a.setTimeout(3000);
disp.setCurrent(a);
conn.close();
}
catch (Exception e)
{
System.out.println("Error in sending");
e.printStackTrace ();
Alert a = new Alert("No!",e.getMessage() + e.toString(), null,AlertType.INFO);
a.setTimeout(-2);
disp.setCurrent(a);
}
}
Please help me.... It is very urgent...
Thanks! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|