Do Android TV apps shut when device is off?

205 Views Asked by At

I want to be able to push notifications to an Android TV to deploy a little deamon service for sharing resources home.

So it is for me really interesting to know if Android TV apps lifecycle is any different.

Do Android TV apps shut when device is off?

1

There are 1 best solutions below

0
On BEST ANSWER

In short, the apps on the TV got paused when the TV is off (it is conceptually the same as locking a phone).

Push notifications (you should use FCM for that) arrive at the device and they trigger a Receiver, that is independent of the app running or not (although the behaviour is slightly different for apps in the background)

There is a key difference on the way FCM is handled, and is that Android TV does not have a system tray and therefore any FCM that arrives to the device that would show on the system tray on a phone is just ignored. For this to work fine you need to send a message that is Data only no notification fields should be included (see the docs on handling notifications).