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
25
votes
4 answers

How to send a SMS using SMSmanager in Dual SIM mobile?

Am using SMS manager to send SMS.For single SIM its works perfectly to send the SMS.but in dual SIM the SMS will not send.Is it possible to send the SMS from dual SIM,if possible means how can i select the Which SIM to send SMS.Can any one know help…
Yugesh
  • 4,030
  • 9
  • 57
  • 97
21
votes
6 answers

Option to send sms using Sim1 or Sim2 programmatically

I have an Android phone with 2 SIM card and I want to send sms using Sim1 or Sim2.By default the message is sent from sim1. But i want to send sms from sim2. Is it possible to setting to send sms using Sim1 or Sim2? It would be great if there is an…
Jebasuthan
  • 5,538
  • 6
  • 35
  • 55
15
votes
3 answers

How can I send sms messages in the BACKGROUND using Android?

I am coming from iphone development where you cannot send an SMS in the background without asking the user to confirm the send. Can sms be sent in the background in android so that no user intervention is need?
yazz.com
  • 57,320
  • 66
  • 234
  • 385
12
votes
2 answers

How to use two emulators at the same time in the same project in Android Studio?

I working in Android Studio and I need some help regarding the emulators. I want to start two emulators so I can use them the same time to test my application. Right now the problem is that when the second emulator loads everything just crashes. How…
Spoofy
  • 621
  • 4
  • 9
  • 27
11
votes
1 answer

OTP/SMS auto fetch issue using SMS Retriever API Android

I'm trying to use Google's SMS Retriever API for Automatic SMS Verification, but there is an issue in it. previously , I was reading sender number using getOriginatingAddress() and if it's valid sender number then read OTP otherwise it should not…
Atif AbbAsi
  • 5,633
  • 7
  • 26
  • 47
10
votes
3 answers

Abort SMS Intent on Android KitKat

I'm currently developing an application that needs to deal with SMS only if it is an SMS expected by the application (same behaviour as Whatsapp on registration). I would like to abort the SMS Intent as it is not expected to appear in the SMS…
user2058839
9
votes
4 answers

Send SMS containing verification code with a "copy code" button

I've managed to send SMS containing verification code from my app using SmsManager and SmsReceiver. But it's just like a normal SMS message. I wonder if I can tell to device that the SMS is containing code, thus user's device will automatically open…
Taufik Nur Rahmanda
  • 1,862
  • 2
  • 20
  • 36
9
votes
2 answers

Delete SMS from android on 4.4.4 (Affected rows = 0(Zero), after deleted)

i want to send SMS from my android device and delete it from mydevice(Sent messages). SMS are saved in device(4.4.4) but SMS is not deleted with my code. after delete rows affected = 0(Zero). My device vesrion is 4.4.4. In other devices, SMS are not…
Gangadhar Nimballi
  • 1,534
  • 3
  • 18
  • 46
9
votes
1 answer

Send SMS until it is successful

I am trying to send an urgent SMS from my application. I have to make sure that the SMS is being sent successfully. The SMS is being sent after the boot of the Android system and after a check is being made. So I have a service class that handles…
hytromo
  • 1,501
  • 2
  • 27
  • 57
9
votes
4 answers

How to abort BroadcastReceiver in android

I am making an SMS schedule app which will simply take time, sms and number from user and send this sms at a given time. I am using PendingIntent. Here is my sample code. When user creates a schedule, it simply calls this method. private void…
8
votes
3 answers

SmsMessage.createFromPdu is deprecated in android API level 23

I am trying to read received SMS using below code, it is working below API level 23, but in API level 23 createFromPdu method is deprecated. In google docs it has an alternate method but how do I use it. public class IncomingSms extends…
8
votes
4 answers

Android sms manager not sending sms

Am new for android . I want send sms after click send button first i have used sms manager api. package com.example.smsproject; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import…
Anand Rajagopal
  • 1,593
  • 6
  • 24
  • 40
7
votes
3 answers

SMSmanager.getDefault() - DEPRECATION - what to replace?

Recently I started studying programming for the android system in the kotlin programming language. When writing a simple application for sending SMS from the application itself, I ran into the problem that SmsManager.getDefault() is now DEPRECATION…
7
votes
1 answer

Android Receive SMS Intent: Get Message Id or Thread Id

I have register a Broadcast listener to receive the android.provider.Telephony.SMS_DELIVER Intent action. I seem to be able to get the body, and sender phone number of this new message. However I am not able to get the Message Id or Thread Id of…
Noah Huppert
  • 4,028
  • 6
  • 36
  • 58
6
votes
2 answers

How to check for successful Multi-part sms send

I have read lots of posts on sending SMS and multipart SMS messages such as: Sending SMS in Android, Sending and Receiving SMS and MMS in Android (pre Kit Kat Android 4.4), Android PendingIntent extras, not received by BroadcastReceiver ... and…
user2400538
  • 131
  • 1
  • 6
1
2 3
34 35