محمد
محمد

Reputation: 139

How I can send message in android without show message in the SMS Inbox?

Im can send sms with this code :

 SmsManager manager = SmsManager.getDefault();
    manager.sendTextMessage("5556", null, "Hi Havij", null, null);

But I dont like my message go in Inbox ! I want dont show it Nowhere ...

Upvotes: 2

Views: 3665

Answers (2)

yogesh khairmode
yogesh khairmode

Reputation: 1

One possible solution is you may send data SMS.

 SmsManager smsManager = SmsManager.getDefault();   
 byte[] messageInBytes = stringMessage.getBytes();  
 smsManager.sendDataMessage(Mobile_no, null, SMS_PORT, messageInBytes , null, null);

Upvotes: 0

Milad Faridnia
Milad Faridnia

Reputation: 9477

One possible solution might be deleting that SMS, But according to Google Docs after 4.4 no app can delete messages except the default messaging app:

Also, the system now allows only the default app to write message data to the provider, although other apps can read at any time. Apps that are not the user's default can still send messages

and for more info I suggest u see this.

UPDATE

after a little search I found what you need but as I told you before it seems its impossible in android 4.4 but if you want to do such work with lower versions of android please take a look at this

Upvotes: 2

Related Questions