Results 1 to 2 of 2
- 04-12-2009, 12:28 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 6
- Rep Power
- 0
Sending SMS to other mobile geting exception as java.lang.IllegalArgumentException
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!
- 08-07-2009, 09:37 PM #2
Member
- Join Date
- Aug 2009
- Posts
- 17
- Rep Power
- 0
Similar Threads
-
sending SMS between PC and mobile
By Halayas in forum Sun Java Wireless ToolkitReplies: 6Last Post: 03-18-2010, 11:45 AM -
Sending sms on mobile
By anjali in forum Advanced JavaReplies: 7Last Post: 04-01-2009, 08:25 AM -
Exception java.lang.NumberFormatException
By vasavi.singh in forum New To JavaReplies: 3Last Post: 02-24-2009, 06:27 AM -
java.lang.StackOverFlowError exception
By jayaj in forum NetBeansReplies: 1Last Post: 06-08-2008, 11:17 AM -
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
By leonard in forum New To JavaReplies: 1Last Post: 08-06-2007, 06:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks