I was using the Android SmsManager provided API sendDataMessage to send SMS messages and noticed that the behavior seems to change from different devices, Here are my observations.
I am able to send messages successfully
My Questions:
In Android, you can use SmsManager API or devices Built-in SMS application to send SMS's. In this tutorial, we shows you two basic examples to send SMS message − SmsManager API SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("phoneNo", null, "sms message", null, null);
Open Settings . Click Apps. In the list of apps, click Messages. SMS.
Regular (text) SMS messages are sent over the cellular network control channel. You can read a good description of exactly what's going one here: http://computer.howstuffworks.com/e-mail-messaging/sms.htm
When you use sendDataMessage
, you're sending over your cell data channel. This is separate from the voice and control channels. That's why nothing gets sent when cell data is off.
The encoding depends on the language and whether it's text vs. data. See 'Message size' in this article: https://en.wikipedia.org/wiki/Short_Message_Service
SMS is complex. You might want to look at a solution provider like Twilio instead of doing it yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With