Why does the messenger application receive messages when the application is stopped?

I hope that we will not be able to receive any messages when we force to stop the default messenger application on our Android device. I force stop the default messenger app and sent a message to this Android device. I get a message on this device. Why is this device receiving a message?

+4
source share
3 answers

In Android 3.1+, it BroadcastReceiverwill work only after the application is forcibly stopped if an explicit one is used to send the broadcast Intent. Here, by “explicit Intent”, I mean the one that contains the ComponentNamerecipient, in addition to possibly other data, such as an action string.

, " " "". SMS, , Android 4.4+, SMS- , SMS-, Android, , Intent, . Android 4.3 , SMS , SMS_RECEIVED .

+4

, , . Google . . → , , .

+1

, , , , , Service . , . Service , , , , Service, , , , . . , .

Android Developer Guide:

- ( ). , (, MP3 ), . [...]

, , GCM (Google Cloud Messaging) - , Service , , Service .

To stop Service, you need to call the method Context stopService()as defined in the documentation before stopping your foreground application.

+1
source

All Articles