0

I wondered what happens when GCM push has arrived and there is no process alive bound to the application. As you know, a process can be killed from the task manager and also by the system to free-up space. Actually, I tested the case of killing it manually from the task manager and saw no incoming pushes. What about if the system kills the process then ?

Thx in advance.

stdout
  • 2,471
  • 2
  • 31
  • 40

1 Answers1

2

Referring following table we can say that, App will not get Push notification if Forced closed by user manually.

However if App is killed by system in case of low memory, BroadcastReceiver will get notified and Push notification will be received by device.

enter image description here

Source of comparison table.

Uniruddh
  • 4,427
  • 3
  • 52
  • 86
  • Thanks for the useful source. Finally, do you have any idea about if the process is cached or not when killed by the system ? – stdout Jan 11 '16 at 16:32
  • By the way, to add something into the"Task Swipe" part, it doesn't the only way to have a background service to prevent the process from being killed by the system. In Android, multiple applications may bound to a single process which also prevent the underlying process to be killed by the system when one of the applications is swiped out. – stdout Jan 11 '16 at 16:40
  • Activity stake is preserved which means saved while killed by system. Even if you are running a background service, your app can be killed in low memory situations. Only way of making sure that you app stays alive is using Foreground services. – Uniruddh Jan 11 '16 at 17:03
  • But it should't be enough to receive push messages, right ? There should be a footprint of process/sandbox in somewhere to quickly wake up the underlying application. – stdout Jan 12 '16 at 07:45
  • Yes, device will get push notifications until app is forced close. – Uniruddh Jan 12 '16 at 07:52
  • Maybe it should be mentioned that different devices have different implementations of "swipe". "Though the result of swiping an app may also differ depending on the device it is running, one may kill/force stop it or other just as mentioned above, will stop background processes." refer to https://stackoverflow.com/questions/37357745/receive-gcm-messages-even-when-app-is-closed-slide-swiped-away/37429495#37429495 – Yazazzello Oct 25 '16 at 08:03