Questions tagged [smsmanager]

Manages SMS operations in Android apps. Functionality includes sending data, text, and pdu SMS messages. Get this object by calling the static method SmsManager.getDefault()

Manages SMS operations such as sending data, text, and pdu SMS messages. Get this object by calling the static method SmsManager.getDefault().

This class was deprecated in API level 4. Replaced by android.telephony.SmsManager that supports both GSM and CDMA.

Visit Android Developer for latest information

516 questions
5
votes
1 answer

Sending 50+ messages causing issues lead to generic failure

I am developing an application in which i need to send 100+ of messages. After going through few threads i came to know there is limitation on sending messages like 100 messages can be send in an hour. To do so i divide my recipient list into chunks…
Hassan Munir
  • 419
  • 7
  • 24
5
votes
1 answer

smsManager.sendTextMessage not working for message that exceeds one sms character limit

I am working with a project which sends firebase dynamic link invitation to friends via sms. My code runs perfecly fine and sends sms when I send smaller links as invitation. like try { SmsManager smsManager = SmsManager.getDefault(); …
asif.ibtihaj
  • 361
  • 5
  • 14
5
votes
0 answers

Sending MMS messages programmatically

I looked at code here: How to send image via MMS in Android? And here: Unable to send MMS using SmsManager And I did some research from other places as well, but so far I'm quite confused about how to send MMS messages to people without using…
jortyjorts
  • 51
  • 3
5
votes
0 answers

What exactly is scAddress in SmsManager's sendTextMessage function?

I'm working on an application that will be sending a text message to another person from the app (this is not being published to the Play Store). I am looking at the documentation for SmsManager, and there is a parameter (which I currently have…
jSnow264
  • 51
  • 1
  • 2
5
votes
2 answers

Android SMSManager Generic Failure

I'm trying to send an SMS with the android.telephony.SMSManager. When i send a SMS to someone around the country, it works. When i try so send an SMS to California for example, it doesnt work anymore. Also, When i try to send a SMS to California, it…
Wouter
  • 73
  • 5
5
votes
1 answer

SMS Manager send mutlipart message when there is less than 160 characters

I write a app which use SMS Manager. I use method sendTextMessage() but it isn't work. Now I am using sendMutlipartTextMessage() and it's work. But it's send multipart message when it is about 60 characters. This is normal? Everywhere I read than…
Seravier
  • 145
  • 1
  • 2
  • 11
5
votes
0 answers

SMS GENERIC FAILURE in Dual Sim phones Android

I am using the SMS Manager class to send SMS through my code. The code works well in single sim phones but in some dual SIM phones, it returns me GENERIC FAILURE. I search a lot for this but found no proper solution for this. Please help me out. my…
Azhar Bandri
  • 892
  • 1
  • 14
  • 27
5
votes
1 answer

Android SmsManger Delivery report

I send multiple message to multiple contact, and for each contact use following code private void sendSMS(String first, String last, String id, String phoneNumber) { try { String message; message =…
Shayan Pourvatan
  • 11,898
  • 4
  • 42
  • 63
5
votes
0 answers

sendMultipartTextMessage and monitor send and received

i have read multiple threads on how to send and receive multipart messages. I have implemented the following code and it works! PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(SENT), 0); PendingIntent deliveredPI =…
JanBo
  • 2,925
  • 3
  • 23
  • 32
4
votes
1 answer

How to send SMS programatically in React Native with phone credit

I was looking for a way to send an SMS programmatically in React Native without using 3rd Party APIs like Twilio or Firebase etc. My intention was to use phone credit / the available airtime in my SIM Card.
Tadiwanashe
  • 1,246
  • 14
  • 15
4
votes
7 answers

SMSManager returns RESULT_ERROR_GENERIC_FAILURE despite trying everything

I am trying to create a feature in my app which can send SMS to multiple contacts in background. I am using SMS Manager API to do the same. However, everytime RESULT_ERROR_GENERIC_FAILURE returns. I read lot of similar posts on stack overflow and…
Vaibhav Agarwal
  • 975
  • 1
  • 7
  • 22
4
votes
1 answer

Unable to send SMS message in Android from variable

When I use this code: String numberToSendFor = "21987654321"; SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(numberToSendFor, null, "Test Message", null, null); The SMS Message is sent normally (and goes to sent messages list in my…
Silvio Delgado
  • 6,798
  • 3
  • 18
  • 22
4
votes
0 answers

Android: Issue in sending MMS with SmsManager programmatically

I need to send MMS programmatically for which Android has provided support from Lollipop: http://developer.android.com/reference/android/telephony/SmsManager.html#sendMultimediaMessage(android.content.Context, android.net.Uri, java.lang.String,…
Vineet Shukla
  • 23,865
  • 10
  • 55
  • 63
4
votes
3 answers

find datamessage in android phone from before app was installed

say I have an app that sends a datamessage with this method smsManager.sendDataMessage(String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent); say the person…
JRowan
  • 6,824
  • 8
  • 40
  • 59
4
votes
3 answers

Android : SMSManager - Attempt to get length of null array

I have a bug from the SMSManager when I try to send a message with the method sendTextMesasge. It returns me a java.lang.NullPointerException: Attempt to get length of null array. There is my code : // Constructs the message …
Sigvent
  • 297
  • 4
  • 17
1
2
3
34 35