Created
August 10, 2014 19:14
-
-
Save kingargyle/55185ab38b177e4c4243 to your computer and use it in GitHub Desktop.
Check to see if an Android device supports the Leanback system feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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