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

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -