JeffLIrion / python-androidtv

Communicate with an Android TV or Fire TV device via ADB over a network.
MIT License
165 stars 57 forks source link

Update launcher intent & Google Play app constants #308

Closed FilHarr closed 2 years ago

FilHarr commented 2 years ago

Had some issues launching a few apps on a SHIELD TV. Did some digging around and it appears that Android TV apps are required to have a 'category.LEANBACK_LAUNCHER' intent filter, but don't necessarily need a 'category.LAUNCHER'. This can, for example, be seen in the Amazon Prime Video app.

These changes update the 'INTENT_LAUNCH' constant to use the LEANBACK_LAUNCHER. I've tested on a number of apps (Youtube, Netflix, Prime Video, Play Store, Play Games, Play Music & TV, BBC iPlayer, BT Sport, Disney+) and they all launch correctly.

Fire TVs should honour the LEANBACK_LAUNCHER intent, but as I don't have one available to test on and don't know if native Fire TV apps have the required intent I've also added some new constants to preserve the previous functionality on Fire TVs.

JeffLIrion commented 2 years ago

Thanks!

FilHarr commented 2 years ago

What would be the process to get this pushed over to the Home Assistant integration? I assume you'd need to release a new version here and then update the HA integration to reference that? Should I open an issue over on the integration?

JeffLIrion commented 2 years ago