SMS receive with no notification

后端 未结 6 2059
旧时难觅i
旧时难觅i 2020-12-06 11:50

I want to receive a sms in my app, but I don\'t want my Android to show a notification about that event. Algorithm:

  1. Receive sms (it\'s ok)

  2. I

6条回答
  •  心在旅途
    2020-12-06 12:23

    You should not do this. Other apps might want or need to receive the SMS_RECEIVED broadcast. Aborting it will disrupt 3rd party apps from running properly. This is a bad way to program. you should only abort broadcasts that you create, not system broadcasts. I don't know why the Android OS lets you do this.

提交回复
热议问题