Question

I'm currently developing an application that needs to deal with SMS only if it is an SMS expected by the application (same behaviour as Whatsapp on registration).

I would like to abort the SMS Intent as it is not expected to appear in the SMS box.

My question is : I know that Google changed a lot about SMS behaviour in KitKat, and now, even if my SMS is well parsed by my application, the SMS also appear in SMSBox, even if I call this.abortBroadcast(); in my SMS broadcast receiver. So is there a way to avoid those SMS appearing in SMS box without having to develop a complete SMS application ?

For information, the priority is yet to 1000 (and I tried also with MAX Integer) in Manifest file for this Broadcast Receiver.

Was it helpful?

Solution

Hangouts uses the maximum possible priority (999 per the Intent-Filter docs) and therefore you cannot abort it on <4.4 releases. On 4.4+, only the default SMS app (blog post with details) can make changes to the SMS Provider (i.e., automatically delete the SMS).

OTHER TIPS

You can't stop a message from showing in Default SMS application in kitkat. Checkout following links for details:

You can block SMS on Android 4.4 - 4.4.4 using

1)

  • Using AppsOpps setting
  • WRITE_SMS permission

Sms will be deleted in 10 seconds with notification about this sms.

As option you can block sound on receiving unwanted sms.

2) Set up your app as default sms app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top