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 -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -