34 - Send a SMS using the SmsManager class in Android

preview_player
Показать описание
Using the SmsManager class to send out a SMS programmatically. Also see if the SMS has been sent and delivered successfully.
Рекомендации по теме
Комментарии
Автор

Are there some settings I might be missing? I have my code the same as yours and when I click the button nothing happens. (note: I have a text field that says "button clicked"). I am running this on a physical device.

DawnDimension
Автор

I've built code as shown in the first part of the video but, nothing happens when I push the sending button :/

salehkhalil
Автор

What if a SOS message sir? how to make a button when you click the button it will sent you directly the longtitude and latitude of your location.

aljoeanthonyberdin
Автор

Very Thanks,
i have a question
How can i handle it when the mobile oriented (landscape) ?

MohamedGamal-xjdq
Автор

Works Perfectly!!! Thnx for the great tutorial + Detailed Work!!!!

syedwaqarali
Автор

Hi, great tutorial. Is there anyway to delete the SMS sent programmatically from the default sent box that the SMS appears in? Cheers in advance.

SophieC
Автор

Great tutorial !!! ... I've managed to send a short SMS but long SMS (407 characters, 3 SMSs as one) fails to send, no exception in Logcat, any idea?
or should I use MMS instead?

kfearok
Автор

what if I want to send the message to some preloaded numbers? I mean I wont have to enter the phone numbers already coz its within the app already.

edselludovice
Автор

Hi Johan, dankie vir die video!

I need to send multiple sms's at the same time and have a mysql database with cellphone numbers. Is it possible to have a 'Send To All' function that will retrieve the numbers from the database and send the message?
TIA

christianojoubert
Автор

I'm creating an android using fragments .I have created a an sms fragment for sending sms to a specific number but when it runs well but when i type the message then press send, the app crashes and closes. help me out.

victordavidgonzalezlemus
Автор

hi do you know how to send sms other than default sim, that means in mobile the default sim selected is sim1 and i want to send sms through sim2 will u help me in this? Thanks in advance...!

IamMohan
Автор

Hi, I get the following problem when I try to run this app: App has stopped....open app again. Any idea what's going wrong? Cheers in advance

SophieC
Автор

Do you know why when i use sendMultipartTextMessage, the SMS takes a loooong time to arrive?

yussefatta
Автор

what will be the output of this code @Johan Jurrius ???

deepaksinghmudila
Автор

Superb Tutorial!
I want to create app for student attendance system that send the sms to their parents present or absent of my class. Kindly guide me on that or make a tutorial for that. waiting for your positive revert.

kissrahul
Автор

The recipients cant reply after i sent them the message using this code. what seems to be the problem?

b.motoadv
Автор

its working fine but the request code which its giving me is "radio off" :?

dipesh
Автор

wow, thanks man, I was really struggling with the permissions.

RuwanIndikaPrasanna
Автор

THANKS SIR... CAN u have a Tutorial about RECEIVING SMS.. Thanks

MrCazmo
Автор

in android oreo api 26, sent messages not saving in content://sms/sent