Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device supports a home screen that is replaceable by third party applications.
Constant Value: "android.software.home_screen"
Constant Value: "android.software.home_screen"
1. Get a PackageManager Instance and save to myPackageManager.
2. Create a Boolean Variable named bolHSSupported.
3. Set the Minimum and Target SDK version to 18 or greater.
4. In the onCreate method, add the below code. This will return the home screen replaceable ability to a boolean named bolHSSupported. It will then display a toast displaying the home screen replaceable ability on the device to the user.
bolHSSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_HOME_SCREEN);
if (bolHSSupported) {
Toast.makeText(this, "Device has home screen replaceable ability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No home screen replaceable ability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_HOME_SCREEN
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_HOME_SCREEN