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

Android duplicate listview item when i am scrolling. how do i fix it?

I am trying to fetch contact numbers from the contact list. hi, my code troubleshooting duplicate item on scroll how I fix this problem? when I scroll my contact list in listview it is showing the duplicate item on scroll up or down. keep repeating.…
Vasudev Vyas
  • 726
  • 1
  • 10
  • 28
-1
votes
1 answer

How to add data into ArrayList in onCreateView Method (View Pager)?

I am making an application for SMS. I have used fragment and I initialize all my component in onCreateView now the problem is, I want to add some data to the Array List using a method which should be call when an SMS come. So where I have to call my…
-1
votes
2 answers

Wonderful string content check

I'm using this code and it retrieve incoming message successfully: Bundle bundle = intent.getExtras(); Object[] object = (Object[]) bundle.get("pdus"); SmsMessage smsMessage = SmsMessage.createFromPdu((byte[]) object[0]); String message =…
Mohammad Lotfi
  • 369
  • 5
  • 16
-1
votes
1 answer

Android :: retrieving data from sqlite database

I have created a database with a table name CONTACTS and their i have two attributes (name,number) .. My job is to send message to that save emergency numbers .. Problem is that I can't retrieve that values or numbers from that Contacts table where…
kumarabhi
  • 1
  • 1
-1
votes
1 answer

Select item from drop down menu and insert in body of new message to edit

I want to insert my drop down menu selected item in the edit text of body of new message so that i can edit the text and made necessary updates if required. My xml code for edit text…
Android beginner
  • 245
  • 2
  • 6
  • 22
-2
votes
0 answers

getDefault() : SmsManager! is deprecated (Kotlin Android - EXISTING AMSWERS DID NOT WORK)

UPDATED I have this code in my loginActivity.kt : if (checkSelfPermission(android.Manifest.permission.RECEIVE_SMS) != PackageManager.PERMISSION_GRANTED || checkSelfPermission(android.Manifest.permission.READ_SMS) !=…
Amir Elahi
  • 31
  • 5
-2
votes
2 answers

Is it possible to send an SMS over Wifi?

I'm working on an Android application in Android Studio and wanted to add a feature that allowed a text (SMS) message to be sent from the application to a mobile phone number. I found one way to do this by using the SMS Manager API, but it seems…
-2
votes
1 answer

Conversation appearing in default messaging application

I have successfully sent an sms programmatically using these lines below. SmsManager smgr = SmsManager.getDefault(); smgr.sendTextMessage(phoneNum, null, bodyText, null, null); Toast.makeText(MainActivity.this, "SMS Sent Successfully",…
-2
votes
1 answer

Issue with SMS manager in Android

I have the following code which asks for permission to send sms from a phone. When i launch the app for the first time, it asks for permission. When i grant it,it will send an sms. But when I close the app and try again, nothing happens when i click…
notem101
  • 15
  • 5
-2
votes
2 answers

automatically sms read not working in android

public class SmsReceiver extends BroadcastReceiver { private static SmsListener mListener; @Override public void onReceive(Context context, Intent intent) { final Bundle data = intent.getExtras(); final Object[] pdus…
-2
votes
1 answer

There are AlamManager, SmsManager etc. in Android. Is there also a Manager for managing calls?

In Android there are AlamManager: AlarmManager alarmanager = (AlarmManager)getSystemService(ALARM_SERVICE); alarmanager.set(AlarmManager.RTC_WAKEUP,System.currentTimeMillis()+(i*1000),pendingIntent); and SmsManager: SmsManager smsManager =…
Code-G
  • 41
  • 5
-2
votes
2 answers

How to send message to multiple numbers using Service?

I want to send message to multiple numbers. I tried to use SMS manager. But it's not working. I am doing it onPostExecute method of an AsyncTask. But I want to create a service and send messages from that service because user can close the…
Sid
  • 2,792
  • 9
  • 55
  • 111
-2
votes
1 answer

Android - Broadcast SMS intent to other (Biult-in sms app) app in android

I am developing an sms app. Now my app is default sms app on the phone. That means my app is receiving incoming sms first. Now I want to send incoming sms intent to other app (Built-in sms app) from my app pro-grammatically. Note : I dont want to…
-2
votes
1 answer

Send a SMS using SMSmanager in Dual SIM mobile?

Can anyone help me. I have a script sms android. This script is working properly. but I have a problem with the dual SIM card mobile phone. My script was successfully sent messages in the SIM CARD 1. but not on the SIM card 2. Can anyone fix my…
-2
votes
1 answer

how to send sms message every 5 minutes and update locaation every 30 second

The following code will update user location every 30 seconds, make some calculations if the location is larger than the radius and then sends SMS message to a phone number. My question is, how to send SMS message every 5 minutes and make update…
1 2 3
34
35