FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Sending SMS to other mobile geting exception as java.lang.IllegalArgumentException URGENT PLEASE!!!

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
maruffaiz



Joined: 16 Feb 2009
Posts: 18

PostPosted: Sun Apr 12, 2009 10:34 am    Post subject: Sending SMS to other mobile geting exception as java.lang.IllegalArgumentException URGENT PLEASE!!! Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB