android - Delete message sent from SMSManager -


i stuck on security issue. trying send message android app using sms manager , after sending message saves message in phone's inbox. want messages not save or delete programmatically.

here code using:

if (contextcompat.checkselfpermission(main6activity.this,                         manifest.permission.send_sms)                         != packagemanager.permission_granted) {    if(activitycompat.shouldshowrequestpermissionrationale(main6activity.this,                             manifest.permission.send_sms)) {                     }         else {                 activitycompat.requestpermissions(main6activity.this,                                 new string[]{manifest.permission.send_sms},                                 my_permissions_request_send_sms);             }    }    else {         activitycompat.requestpermissions(main6activity.this,                             new string[]{manifest.permission.send_sms},                             my_permissions_request_send_sms); }  @override public void onrequestpermissionsresult(int requestcode,string permissions[],               int[] grantresults) {     switch (requestcode) {         case my_permissions_request_send_sms: {             if (grantresults.length > 0                     && grantresults[0] == packagemanager.permission_granted) {                 smsmanager smsmanager = smsmanager.getdefault();                 smsmanager.sendtextmessage(phone, null, "your password                        "+password, null, null);                 toast.maketext(getapplicationcontext(), "sms sent \nmake                          sure have enough balance send message",                         toast.length_long).show();             } else {                 toast.maketext(getapplicationcontext(),                         "sms faild, please try again.",                          toast.length_long).show();                 return;             }         }     }  } 

please me. in advance.

but want messages not save or delete programatically.

this not possible on android 4.4+. user's chosen sms client app can modify contents of sms provider.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -