I was able to change the default launcher on Android Studio emulator but unable to do the same on the physical Android TV.
This is how I did it:
- Add the following line to manifest
<category android:name="android.intent.category.HOME" />, telling the system that my app is also a launcher. - Uninstall Leanback launcher by executing
adb shell pm uninstall -k --user 0 com.google.android.leanbacklauncherandadb shell pm uninstall -k --user 0 com.google.android.tvlauncher. This is the extra step for Android TV only.
On my emulator it works as expected, pressing HOME key, clicking BACK keys repeatedly and resetting the device goes back to my app.
But on the physical TV, pressing HOME key works fine. Clicking BACK key repeately and resetting the device goes to a blank screen.
My question is, is there an official way of changing default launcher on Android TV just like Android Mobile?
thanks!