BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 12-08-2009, 06:37 AM   #1 (permalink)
New Member
 
Join Date: Dec 2009
Model: 9000
PIN: N/A
Carrier: Airtel
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Text Message/SMS code not working

Please Login to Remove!

I am trying to send SMS through from a BlackBerr(BB) application. I am tring following process:

Thread t = new Thread(this);
t.start();
public void run(){

String address = "sms://1234567890";

MessageConnection smsconn = null;

try {
smsconn = (MessageConnection) Connector.open(address);

TextMessage txtmessage = (TextMessage) smsconn.newMessage(MessageConnection.TEXT_MESSAGE) ;
txtmessage.setAddress(address);
txtmessage.setPayloadText("SMS sending suceessfull");

smsconn.send(txtmessage);

} catch (Exception t) {
System.out.println(t.getMessage());
Dialog.alert(t.getMessage());
System.out.println(t.getClass().getName());
}

if (smsconn != null) {
try {
smsconn.close();
} catch (IOException ioe) {
System.out.println(ioe.getMessage()); }
}

}
}

The message is not getting send and no error is displayed.


PLease help!!!!!
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

Vectron, 10MHz OCXO, 3.3VDC, 1”x”1”x0.5”, SC-Cut, Voltage Frequency Control
$35.0
Vectron, 10MHz OCXO, 3.3VDC, 1”x”1”x0.5”, SC-Cut, Voltage Frequency Control pictureCRT High Voltage Test Probe
$35.0
CRT High Voltage Test Probe pictureMini DC 0.1-30V Red LED 3-Digital Display Voltage Voltmeter Meter for Motorcycle
$0.01
Mini DC 0.1-30V Red LED 3-Digital Display Voltage Voltmeter Meter for Motorcycle pictureDC-DC Boost Buck adjustable step up down Converter XL6009 Module Voltage US
$5.59
DC-DC Boost Buck adjustable step up down Converter XL6009 Module Voltage US pictureCaddock MG815 1.8K, Tol. 5%, High Voltage Resistor, 15 Watt, NOS
$88.0
Caddock MG815 1.8K, Tol. 5%, High Voltage Resistor, 15 Watt,  NOS picture






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