lucasvdh / codes.lucasvdh.android-tv

Android TV connector for Homey Pro
GNU General Public License v3.0
0 stars 2 forks source link

RemoteControlClient deprecated #8

Closed ludwich closed 11 months ago

ludwich commented 11 months ago

@lucasvdh thanks for a nice way of controlling the nvidia shield.

Looked thru the code and it looks like you are using RemoteControlClient or am I wrong? Could we look at using MediaSession instead since remote client seems to be deprecated and media session will have callbacks on events like playing and so on.

https://developer.android.com/reference/android/media/RemoteControlClient https://developer.android.com/reference/android/media/session/MediaSession

I would gladly help developing it.

lucasvdh commented 11 months ago

Hi @ludwich,

Thank you for your kind words and your interest.

Regarding the deprecated RemoteControlClient; I would love to switch to the newer MediaSession implementation.

However, as far as I know the RemoteControlClient is the only API for which there is any documentation to be found online. Also the Nodejs client that I use to talk to this API was reverse engineered as I don't think there is any official documentation. No simple feat.

That said, if you know a way (or a way to find out) how we can remotely talk to the MediaSession API without relying on something like an adb server, let me know!

ludwich commented 11 months ago

I will have a look during the weekend. You can close this one.

lucasvdh commented 11 months ago

Cool, keep me updated 👍