Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
BlackBerry Development Advisor
Posts: 15,300
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell
Accepted Solution

Unable to send SMS on Verizon device

Quote from the previous forum:


Guest
Unable to send SMS on Verizon device
Posted: Mar 7, 2007 8:11 PM
 
The following code snippet for sending a SMS text message using WMA works fine on a T-Mobile (e.g. 8700g) and on a Cingular (e.g. 8700c) device:

MessageConnection con = MessageConnection)Connector.open(address);

TextMessage msg = (TextMessage)con.newMessage(MessageConnection.TEX T_MESSAGE);

msg.setAddress(address);
msg.setPayloadText(content);
con.send(msg); // throws IOException on Verizon devices

However, the exact same code does not run on Verizon devices (e.g. 7130e or 8703e). The line: con.send(msg) throws an IOException. I tried using different formats for "address" (e.g. "1234567", "+1234567", "8001234567", "+8001234567", "18001234567", "+18001234567", etc.) but they all failed.

Does anyone know if sending SMS text messages using WMA is supported on Verizon devices?

 


Guest: Gautam
Re: Unable to send SMS on Verizon device
Posted: Jul 10, 2007 11:23 AM
 
I am also having this problem. It seems like its port related.

Any input would be appreciated.

 

Guest: Guest
Re: Unable to send SMS on Verizon device
Posted: Aug 10, 2007 2:55 PM
 
I am also having the same problem on a BB 8830 device and an older model Verizon device. Is this an issue with all Verizon devices or specific to CDMA based Blackberries ?

 

jclarke

Posts: 1
Registered: Jan, 2008

Re: Unable to send SMS on Verizon device
Posted: Jan 8, 2008 1:45 PM
 
I am having same issue on Verizon BB 8830. SMS fails with IOException null, however, http works fine.

Sending to sms://+15555551212 {not real number}

Phone log:

S Java Exception - IOException
E net.rim.sms - TEfa-0x8000001f
d net.rim.sms - TXsb
i net.rim.sms - TXst
a System - CMMSmiley FrustratedpecPhone(3404) no
a net.rim.sms - INch
a System - CMMSmiley FrustratedpecPhone(3404) no

Any suggestions? Any were these cryptic log messages are defined?

 

Guest: Joe
Re: Unable to send SMS on Verizon device
Posted: Feb 6, 2008 7:52 PM
 
I also note the exact same problem on a Sprint BlackBerry Pearl and 8830. Namely, SMS messages cannot be sent and we get an IOException with a null message when it fails. The same exact code works fine on GSM blackberry.

Is there a solution to this problem?

I think the quality of the RIM devices on CDMA is shoddy. RIM is rushing these devices out the door. In addition to not being able to send SMS, the Sprint devices also seem to inexplicably lose network and require doing a MASTER WIPE in order to restore network connectivity. None of these problems happen on the GSM Berries.

 

jeyaprakash.c

Posts: 49
From: chennai,india
Registered: Oct, 2007

Re: Unable to send SMS on Verizon device
Posted: Mar 21, 2008 1:45 AM
 
I too got this problem. the working code wont send sms on cdma phones sprint and other some oprators protects sms Api from third party tat cdma phones requires both RIM and operator level certificate..

 

fpotter

Posts: 28
From: Mountain View, CA
Registered: Feb, 2008

Re: Unable to send SMS on Verizon device
Posted: Apr 23, 2008 4:53 AM
 
Could someone from RIM please chime in here and confirm whether or not sending SMS on CDMA phones should work? I just burned 3 hours playing with different things, and messing with smsdemo.

If it's a bug, it'd be nice to have it confirmed so that we can all stop wasting our time.

If it's something that requires operator-level signing, that'd be nice to know, too.




 

saziz

Posts: 181
Registered: Mar, 2007

Re: Unable to send SMS on Verizon device
Posted: Apr 23, 2008 11:14 AM
 
Programmatically, sending messages on CDMA handhelds is currently not supported. As a possible workaround you may use the Invoke API to send SMS messages via the Messaging Application:

net.rim.blackberry.api.invoke.Invoke
http://tinyurl.com/6yecb4

Sarim
BlackBerry Developer Journal
www.blackberrydeveloperjournal.com

 

Guest: Matthew Wheaton
Re: Unable to send SMS on Verizon device
Posted: Jul 21, 2008 1:12 AM
 
True...but this just opens the app with the information pre-populated. How to get it to send without user intervention?

 


This can be accomplished by using the EventInjector and injecting the trackball/wheel commands to send the message using the menu.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Retired
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

Re: Unable to send SMS on Verizon device

As noted in the thread, we do not support JSR-120 for sending and receiving SMS messages on CDMA devices today.  However, you can use the low level DatagramConnection class as outlined in this knowledge base article to receive SMS messages programmatically (http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is... ) and it is my understanding that you can send messages in a similar fashion.

 

 

Mike Kirkup
Director, Developer Relations
New Developer
Posts: 37
Registered: ‎07-15-2008
My Device: Not Specified

Re: Unable to send SMS on Verizon device

Mark,

 

Using the EventInjector to inject trackwheel and trackball events requires keystroke injection enabled for the given application, no? If this is the case, then the majority of BES users will not be able to do that due to administrative restrictions. I asked this question (similar) in another thread. I keep getting conflicting answers if there is ANY way, totally programmatically, to SEND and SMS on a CDMA device. I got another response from 'mkirkup' pointing me to a KB article using a DatagramConnection to send SMS. I have read other posts, with an answer from you that stated uncategorically that it is IMPOSSIBLE to send SMS on a CDMA device totally programmatically. Is there a way I can get a 'final' answer on this? Smiley Very Happy  If it cannot be done in any way except using Invoke, then the misinformation from 'mkirkup' should be corrected.

 

To note: there is a new application out there called Vlingo, which prepopulates an SMS message with the native SMS app, and sends it, seemingly without using keystroke injection, because I disabled it in the security preferences for the app. Any way you can see this to be accomplished, as the message that is sent from the app shows up in the SMS outbox, presumably meaning it was totally processed thru the native SMS app?

 

Thanks so much.

 

Matthew Wheaton

Developer
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: Unable to send SMS on Verizon device

Here is a code sample that seems to work on Sprint and Verizon devices:

 

DatagramConnection connection = null; try { byte[] bytes = messageAsString.getBytes(); connection = (DatagramConnection) Connector.open( url ); Datagram datagram = connection.newDatagram( bytes, bytes.length ); connection.send( datagram ); } catch (Throwable t) { log.error( "Unable to send SMS to " + entry.getRecipient() + " with the url " + entry.getHttpRequest().getUrl() + ". Message: " + t.getMessage(), t ); throw t; } finally { IOUtility.safeClose( connection ); }

 

 

 

Kurt Zettel | Chief Architect | Metova
www.metova.com
Highlighted
Developer
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: Unable to send SMS on Verizon device

Because the Datagram method only works on CDMA and the TextMessage code only works on everything else you can use this method and then send the correct type of sms message:

 

public boolean isCDMA() { return RadioInfo.getNetworkType() == RadioInfo.NETWORK_CDMA; }

 

 

 

Kurt Zettel | Chief Architect | Metova
www.metova.com
New Developer
Posts: 37
Registered: ‎07-15-2008
My Device: Not Specified

Re: Unable to send SMS on Verizon device

Hi Kurt,

 

Could you provide a little more information? Specifically, what do the variables messageAsString, url, and entry contain?

I clearly see what you're doing, but I'm not sure of the format of the content of the variables. Where does the 'entry' variable come into play, other than in the exception ?

 

You could really make a LOT of people happy by my being able to send SMS programmatically on Sprint/Verizon/CDMA devices!!!

Developer
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: Unable to send SMS on Verizon device

messageAsString is a String variable of the message you wish to send.  The url is a string such as sms://8005551212.  You can ignore the entry, it was a simple bean object that contained the url and the message.  I renamed them in the sample to be more descriptive but I didn't change the error handling.

Kurt Zettel | Chief Architect | Metova
www.metova.com
Developer
Posts: 26
Registered: ‎07-23-2008
My Device: Not Specified

Re: Unable to send SMS on Verizon device

[ Edited ]

I tried using this code to send a port-directed SMS from a Verizon phone (url = "sms://" + PhoneNumber + ":" + port; ). It sent an SMS, but the port was stripped out.

 

I also tried running the DatagramConnection code on a TMobile phone. It sent an SMS, but the port was stripped out again. However, the TMobile phone was able to send a por-directed SMS using the MessageConnection code. Why does the DatagramConnection behave so differently? Is there another way I can set the port?

 

Thanks!

Message Edited by MrBawn on 07-24-2008 10:40 AM
Developer
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: Unable to send SMS on Verizon device

You cannot send port directed SMS messages to a Verizon phone.  I don't think you can send them from a Verizon phone either.  The CDMA network they use doesn't handle messages the same way as other networks so they ignore the port on the message and treat it as a regular SMS.

 

T-Mobile is a GSM phone.  I recommend using MessageConnection to send SMS from the T-Mobile phone and only use the DatagramConnection to send SMS messages from CDMA phones. 

Kurt Zettel | Chief Architect | Metova
www.metova.com
New Developer
Posts: 17
Registered: ‎10-28-2008
My Device: Not Specified

Re: Unable to send SMS on Verizon device

Hi.

 

Sending an SMS as a datagram on a CDMA device sends the message as a binary message, consequently many non BlackBerry phones do not know what to do with it. Has anyone managed to work out what magic hat you have to put on the datagram for the message to be sent as a TextMessage. Alternatively does anyone know if it is definetly not possible to send a TextMessage programmatically from a CDMA BlackBerry device to say a Series 40 Nokia device. My interest is in sending regular SMS messages, as opposed to SMS messages to signal or carry information to a bespoke application or service.

 

Cheers,

 

Haemish