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

Comdial DX-80 VM II 7271 7271C Voicemail 128 FLASH Refurbished Quantity Availab
$299.0
Comdial DX-80 VM II  7271 7271C Voicemail 128 FLASH Refurbished Quantity Availab pictureSpyderco USBBK Bug Black USB Flash Drive - 2GB Storage
$12.2
Spyderco USBBK Bug Black USB Flash Drive - 2GB Storage pictureBSA A7 Plunger 500 Chrome Maroon Fuel Tank+Cap+Petcock Star Twin Golden Flash
$450.0
BSA A7 Plunger 500 Chrome Maroon Fuel Tank+Cap+Petcock Star Twin Golden Flash picture10PCS ATTINY85-20SU WSOP-8 TINY85-20SU 2/4/8K Bytes In-System Programmable Flash
$10.29
10PCS ATTINY85-20SU WSOP-8 TINY85-20SU 2/4/8K Bytes In-System Programmable Flash pictureFlash Furniture Mid-Back Purple Quilted Vinyl Swivel Task Chair
$78.0
Flash Furniture Mid-Back Purple Quilted Vinyl Swivel Task Chair picture






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