How can an Android phone app retrieve the list of installed apps from a connected Android TV over Wi-Fi?
I'm developing an Android TV remote control application that connects to an Android TV over the local Wi-Fi network.
One feature I want to implement is an Apps screen where users can see all apps installed on their Android TV and launch any app directly from their phone.
I know that on a local Android device I can use PackageManager to retrieve installed applications, but in this case the apps are installed on the Android TV, not on the phone.
My questions are:
Is there any official Android API that allows a remote Android application to retrieve the list of installed apps from a connected Android TV?
If not, is there any supported protocol or service (ADB, Google Cast, Android TV Remote Service, etc.) that exposes the installed app list?
How do existing Android TV remote apps display installed TV apps? Are they using a public API, or is this only possible with system-level permissions or manufacturer-specific implementations?
The phone and the TV are connected to the same Wi-Fi network. I already have communication between the phone and the TV for remote control functionality, but I'm specifically looking for the best way to obtain the installed application list so users can launch their favorite apps from the remote app.
I'm looking for an official or recommended approach rather than relying on undocumented or root-only solutions.