BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-15-2007, 04:57 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2007
Model: 8707v
Carrier: c
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Sms api how put the phone number

Please Login to Remove!

Hi,
I want to send a sms from my app with the api.
I use this code:

" Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(MessageArguments.ARG_NEW_SMS)); "

But I want to put the phone number directly for when the sms screens appears, the phone number is write there.

AnyOne know how can I make it?

Thanks in advance
Offline  
Old 10-15-2007, 05:36 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you want to use the sms-application of the device you have to work within its limits.

you can send a sms on your own though.

code to send the message 'msg' to the number 'number' :

Code:
 MessageConnection _dc = (MessageConnection)Connector.open("sms://"+number);                 
            Message sms = _dc.newMessage(MessageConnection.TEXT_MESSAGE);
            TextMessage sms2 = (TextMessage)sms;
            sms2.setPayloadText(msg);                        
            _dc.send(sms2);
hth,
simon
__________________
java developer, Devinto, hamburg/germany

Last edited by simon.hain : 10-15-2007 at 05:37 AM.
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

10pcs CSTCE16M0V53-RO Ceramic Crystal SMD 16MHZ SMD-3 16.000MHZ
$1.99
10pcs CSTCE16M0V53-RO Ceramic Crystal SMD 16MHZ SMD-3 16.000MHZ pictureDental Model Crystal Implant Teeth Model For Clinic Demonstration G009 JY
$43.99
Dental Model Crystal Implant Teeth Model For Clinic Demonstration G009 JY picture5 Pcs Dental Oral Teeth Gems Clear Color Crystal Tooth Ornaments Jewelry
$6.98
5 Pcs Dental Oral Teeth Gems Clear Color Crystal Tooth Ornaments Jewelry picture25pcs 14MHz 14.000MHz Crystal HC-49S Low Profile
$3.99
25pcs 14MHz 14.000MHz Crystal HC-49S Low Profile picture50pcs 14MHz 14.000MHz Crystal Oscillator HC-49U
$19.99
50pcs 14MHz 14.000MHz Crystal Oscillator HC-49U picture






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