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

4x4 Matrix in Python -

wso2is - WSO2 IS 5.0.0 SP1 After restart there is authentication error -

python - PyInstaller UAC not working in onefile mode -