I\'m building a service that sends a list of installed apps from an Android TV or a Fire TV to a mobile phone. The phone then sends back the package name of the app it wants
Intent launchIntent = null;
try{
launchIntent = context.getPackageManager().getLeanbackLaunchIntentForPackage(pkgName);
} catch (java.lang.NoSuchMethodError e){
}
if (launchIntent == null) launchIntent = context.getPackageManager().getLaunchIntentForPackage(pkgName);
if (launchIntent != null) {
launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(launchIntent);
} else {
// failure message
}