android - send sms from background -
1) uri uri = uri.parse("smsto:" + phonenumber); intent intent = new intent(intent.action_sendto, uri); intent.putextra("sms_body", smsbody); startactivity(intent);
this code sending sms. action_sendto not send sms directly other user. action_sendto shows sms box fill other user name , smsbody.
how sms send directly other user sms body ?
2) smsmanager smsmanager = smsmanager.getdefault(); smsmanager.sendtextmessage(phonenumber, null, smsbody , null, null);
this code not working...
add send sms permission manifest
Comments
Post a Comment