Skip to content

Instantly share code, notes, and snippets.

@kingargyle
Created August 10, 2014 19:14
Show Gist options
  • Save kingargyle/55185ab38b177e4c4243 to your computer and use it in GitHub Desktop.
Save kingargyle/55185ab38b177e4c4243 to your computer and use it in GitHub Desktop.
Check to see if an Android device supports the Leanback system feature
public class LeanbackUtil {
/**
* Returns true if the Leanback System feature is available otherwise false
*
* Can be used to help determine if running on an android tv device with the leanback launcher.
*/
public static boolean isLeanbackSupported(Context context) {
final PackageManager pm = context.getPackageManager();
return pm.hasSystemFeature("android.software.leanback");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment