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
3
votes
1 answer

Android delete sms messages in sent box

Before Android KitKat, it was possible to send SMS messages without them being stored in the sent folder of the installed messaging apps on the device, using this method: SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phonenumber,…
Armadillo
  • 457
  • 1
  • 9
  • 17
3
votes
1 answer

KitKat - Management of SMS

I'm developing an application that works like an SMS BlackList / WhiteList. It is not a SMS application right now. The goal is: If the number is in Blacklist, it prevents the user for receiving / sending sms and it does not appear on his sms…
Joxad
  • 69
  • 3
3
votes
0 answers

How to wait confirmation SMS is sent in AsyncTask?

I am trying to send a couple of messages in my AsyncTask and I want to track progress of sent messages. Thanks to excellent post by @cYrixmorten on this topic https://stackoverflow.com/a/19084559/3339562 I have done most of the things I wanted. Here…
user3339562
  • 1,325
  • 4
  • 18
  • 34
3
votes
1 answer

sms delivery message with phone number

I tried to send group sms and it works fine. But, I want to know which numbers are received my sms on delivered status: For know delivered status I used below code: public class SMSdelivered extends BroadcastReceiver { @Override …
Lokesh
  • 5,180
  • 4
  • 27
  • 42
3
votes
0 answers

Android sendtextmessage doesn't work on some devices

I'm trying to send an SMS from my Service. It works on some devices and does not work on others. I tried the following ways to send an SMS: first variant: SmsManager manager=SmsManager.getDefault(); manager.sendTextMessage(number,…
Artem
  • 1,566
  • 1
  • 10
  • 15
3
votes
1 answer

Android: SMS is blocked by ChatON app

I have written an app which receives incoming SMSes, saves it and displays it to the users. Suddenly my app stopped receiving SMS due to Samsung's ChatOn app update. Here is the my Manifest.xml:
User12111111
  • 1,179
  • 1
  • 19
  • 41
3
votes
3 answers

How to send MMS without intent programmatically

Uri uri = Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/test.png"); Intent i = new Intent(Intent.ACTION_SEND); i.putExtra("address","1234567890"); i.putExtra("sms_body","This is the text mms"); …
user2436235
  • 53
  • 1
  • 8
3
votes
2 answers

How to Know which Sms is sent/delivered from Android BroadcastReceiver?

I have made a simple app to send multiple SMS on android. I cannot find which sms is Sent/Delivered, because the delivery notification does not tell for which it is. here is my code : this.destination = data[0]; this.body = data[1]; …
Yoesoff
  • 368
  • 5
  • 11
2
votes
1 answer

NullPointerException when i call SmsManager.sendTextMessage() method

When this line is executed: val smsManager = context.getSystemService(SmsManager::class.java) I am getting this exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void…
devblock
  • 113
  • 7
2
votes
0 answers

Android SMSManager onReceive also receiving push messages

I'm developing an app that listens to incoming SMS. Everything is working fine, but the problem is in onReceive() method of Broadcast receiver, it is also receiving the SIM card's push (Class 0) messages (like balance info / SMS remaining, etc which…
Vishal Afre
  • 1,013
  • 3
  • 12
  • 39
2
votes
1 answer

How to pass data of sent SMS message using PendingIntent to BroadcastReciever?

I want to pass some data to BroadcastReceiver when sending a lot of SMS to indicate which message is sent/delivered. I tried to use standard PendingIntent with different flags but got wrong results (BroadcastReceiver always get first/last extras of…
2
votes
1 answer

Trouble with using SMS manager when used with a Service

I am new to android. I am creating a android service which retrieves the current location and send it as a message to a particular number. I have almost achieved it, but when I use SMSManager to send message of the retrieved location value the app…
Prakaash M
  • 37
  • 8
2
votes
0 answers

Hide SMSs sent using SMSManager Android

I'm using SMSManager to send and receive Multipart Text Message sms.sendMultipartTextMessage(strPhone,null,messageParts,sentPendingIntents,deliveredPendingIntents); but what i see that on some devices the SMSs sent are not shown like on Huawei…
nouha
  • 143
  • 13
2
votes
0 answers

Stock Android - Block USSD Balance Update Pop Up Messages

I am trying to build and flash a custom rom for Nexus 6p. One of the things I am trying to do is block the USSD Balance update pop up messages that show up after sending a message, making a call and data usage. This happens on a prepaid cellular…
Hells Guardian
  • 395
  • 1
  • 4
  • 16
2
votes
0 answers

Sms intent does not return to app when device has dual sim and while sending let user for sim selection

I am using this code to open SMS Intent in my Android app. But after Sending SMS it does not come back to my application, when the device has dual sim and it asks the user for sim selection for sending message. And in certain cases it automatically…
Ritu Nagpal
  • 161
  • 1
  • 11