BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 03-17-2009, 05:53 AM   #1 (permalink)
Knows Where the Search Button Is
 
baskaraninfo's Avatar
 
Join Date: Feb 2009
Location: Bangalore
Model: 9350
PIN: N/A
Carrier: Telstra
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question What's the difference between Email and SMS message composing using Java api's

Please Login to Remove!

I have been using the following to create an email message:

Quote:
Session session = Session.getDefaultInstance();
Store store = session.getStore();
// WHERE TO SAVE THE SEND MESSAGES
Folder[] folders = store.list(Folder.SENT);
Folder sentfolder = folders[0];
net.rim.blackberry.api.mail.Message msg = new net.rim.blackberry.api.mail.Message(sentfolder);
But, how can I create a SMS message using Java api?

Thanks
Offline  
Old 03-17-2009, 07:18 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You need the other Message class: javax.wireless.messaging.Message
Offline  
Old 03-18-2009, 01:58 AM   #3 (permalink)
Knows Where the Search Button Is
 
baskaraninfo's Avatar
 
Join Date: Feb 2009
Location: Bangalore
Model: 9350
PIN: N/A
Carrier: Telstra
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Code to send sms

I have used the following code to send the sms:

MessageConnection _dc = (MessageConnection)Connector.open("sms://"+number);
Message sms = _dc.newMessage(MessageConnection.TEXT_MESSAGE);
TextMessage sms2 = (TextMessage)sms;
sms2.setPayloadText(msg);
_dc.send(sms2);
Offline  
Closed Thread


Thread Tools

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

ShoreTel ShorePhone VoIP IP 265 6-Line IP Display Telephone with Base & Stand
$40.0
ShoreTel ShorePhone VoIP IP 265 6-Line IP Display Telephone with Base & Stand pictureAdtran IP712 1200770E1#B VoIP 12 button Display Phone *New Other*
$39.95
Adtran IP712 1200770E1#B VoIP 12 button Display Phone *New Other* pictureNew Polycom 2201-15600-001 SoundStation IP 6000 VoIP Conference
$119.98
New Polycom 2201-15600-001 SoundStation IP 6000 VoIP Conference  pictureCisco IP Phone 7911 VoIP / PoE Phone System/Telephone - cp-279.1oz/CP-7911
$18.45
Cisco IP Phone 7911 VoIP / PoE Phone System/Telephone - cp-279.1oz/CP-7911 pictureLOT of 25 Cisco CP-7940G 7940G VoIP PoE IP Business PHONE w/ Handsets
$199.0
LOT of 25 Cisco CP-7940G 7940G VoIP PoE IP Business PHONE w/ Handsets picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.