Kunalpod
Kunalpod

Reputation: 3

How do i find if sms has been sent in android?

I am developing an app that uses an sms sending(via an intent) feature. To make the app more effective I wish to know the send status of the sms too, so as to notify user that sms has indeed been sent. This is because sometimes sms might not be sent because of poor connectivity, low balance,and so on and so forth.I wish to know how this can be done, since most search results suggest querying through sms log, which I do not want my app to do. Thanks

Upvotes: 0

Views: 126

Answers (2)

Eric B.
Eric B.

Reputation: 4702

You can use the Telephony Content Provider. For the text message you have just sent, you can check its type. If it is MESSAGE_TYPE_FAILED, then you know the message has not been sent.

Upvotes: 0

Shekhar
Shekhar

Reputation: 832

You can see this tutorial SMS/Message delivery and sent confirmation in Android with example

Make sure to add this permission

<uses-permission android:name="android.permission.SEND_SMS" />

in your AndroidManifest.xml file.

Upvotes: 1

Related Questions