Hide sms notifications with a broadcastreceiver in KitKat

后端 未结 3 508
遥遥无期
遥遥无期 2021-02-11 10:26

I\'m trying to intercept the received SMSs by using a broadcast receiver. Here is the code:

    

        
相关标签:
3条回答
  • 2021-02-11 11:04

    If user has set your application as default SMS app, then he/she is not going to get an SMS notification. You have to handle the notification, as well as other feature of the SMS in your app.

    For more information read this blog.

    Check out other blog and sample app.

    0 讨论(0)
  • 2021-02-11 11:12

    As you said you are running KitKat, then answer is - you cannot mute default SMS app. You can also receive messages or send (that's why you get messages), but still, you cannot "consume" the message.

    0 讨论(0)
  • 2021-02-11 11:23

    You need to call abortBroadcast();, see my answer to communication between two device using sms

    If you are running Android 4.4 KitKat, it seems to be more difficult to do these sorts of things and have not looked into it yet myself.

    0 讨论(0)
提交回复
热议问题