I want to hide my sent items when i send any sms from my app or dont log it at all.
Here is the code i have here:
SmsManager smsManager = SmsManager.getDefault();
PendingIntent piSent = PendingIntent.getBroadcast(contextUpdate, 0, new Intent("SMS_SENT"), 0);
PendingIntent piDelivered = PendingIntent.getBroadcast(contextUpdate, 0, new Intent("SMS_DELIVERED"), 0);
smsManager.sendTextMessage(alarmNumber, null, alarmCode + " " + sentDisarmCode + " OFF", piSent, piDelivered);
If am not mistaken to skip saving the sms in sent i have to write null to piSent
and piDelivered
. But i need these 2 broadcasts so i know if my messaged is sent by a toast message i have and to know if its delivered.
Is there anything else i should try?