Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device's touch screen is capable of tracking two or more fingers fully independently.
Constant Value: "android.hardware.touchscreen.multitouch.distinct"
1. Get a PackageManager Instance named myPackageManager.
Constant Value: "android.hardware.touchscreen.multitouch.distinct"
1. Get a PackageManager Instance named myPackageManager.
2. Create a Boolean Variable named bolTMDSupported.
3. Set the Minimum and Target SDK version to 8 or greater.
4. In the onCreate method, add the below code. This will return the touch screen multi-touch distinct ability to a boolean named bolTMDSupported. It will then display a toast displaying the touch screen multi-touch distinct ability of the device to the user.
bolTMDSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT);
if (bolTMDSupported) {
Toast.makeText(this, "Device has Touch Screen Multi-Touch distinct capability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No Touch Screen Multi-Touch distinct capability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT