java - Android send SMS from code -


this question has answer here:

in android there option make call code , there option move user caller app number , let him call himself. have code move user sms app content ready:

uri smsuri = uri.parse("sms:0542158081"); intent intent = new intent(intent.action_view, smsuri); intent.putextra("sms_body", text); startactivity(intent); 

but want send sms code phone call instead of waiting user. how can it?

user smsmanager so

smsmanager smsmanager = smsmanager.getdefault(); smsmanager.sendtextmessage("phonenumber", null, "sms message", null, null); 

Comments

Post a Comment

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -