You Are Here:

Community: Developer Discussion Boards

#1 Old SMS and 7650 - 2003-02-08, 17:16

Join Date: Mar 2003
Posts: 10
mugent
Offline
Registered User
Is it possible to send an SMS with a 7650 through java, I have tried the following code, but the line marked with stars causes the applet to crash on startup.

What am I doing wrong? Should I use a different API?

Thanks

Moray


public static int sendSMS(String PhoneNumber,String TheMessage){
try {
MessageConnection conn = (MessageConnection) Connector.open(PhoneNumber);
TextMessage msg = (TextMessage) conn.newMessage(MessageConnection.TEXT_MESSAGE);
msg.setAddress(PhoneNumber);
msg.setPayloadText(TheMessage);
conn.send(msg); //******************************
return 1;
} catch (Throwable e) {
return 0;
}
}
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia