Recently toss android4.4 SMS blocker issue, ask to receive text messages on the app when pop-up hints and display the features.
Then we found two ways to use Broadcastreceiver and ContentProvider, and then the question came:
When I use ContentProvider and broadcast at the same time to deal with the discovery: if the use of ContentProvider text message processing (marked as read or deleted), Then the message will not be received in the Broadcastreceiver (android4.4 or later).
But if I do not deal with the time, look at log log, obviously is broadcastreceiver first executed.
Since Abortbroadcast is not available in the android4.4 or above version of SMS, I android4.4 the following version of the test to use Abortbroadcast in Broadcastreceiver, the result ContentProvider will not be received.
This is very confusing.
In addition, I also used the Vivo x3l mobile phone, this phone is the default with Rights management software, and in this mobile phone use of SMS broadcastreceiver when there is a wonderful place, That's him. Although the system is 4.3, I also opened the right to read text messages, I can not intercept broadcast, and later I use ContentProvider operation read and write text messages to allow the read and write and delete text messages and send and receive text messages, the results can be received this broadcast, it is easy to think that the phone On your app must get all the rights to the text message you can receive SMS broadcast, and Xiaomi and Huawei mobile phones do not need, really ya ya egg pain ah.
Some questions about the Android intercept SMS