Feature for getSystemAvailableFeatures() and hasSystemFeature(String)
The device's touch screen supports multitouch sufficient for basic two-finger gesture detection.
Constant Value: "android.hardware.touchscreen.multitouch"
Some examples of Touch Screen Multi-Touch Android Tablets and Touch Screen Multi-Touch Android Phones.
1. Get a PackageManager Instance named myPackageManager.
Constant Value: "android.hardware.touchscreen.multitouch"
Some examples of Touch Screen Multi-Touch Android Tablets and Touch Screen Multi-Touch Android Phones.
1. Get a PackageManager Instance named myPackageManager.
2. Create a Boolean Variable named bolTSMSupported.
3. Set the Minimum and Target SDK version to 7 or greater.
4. In the onCreate method, add the below code. This will return the touch screen multi-touch ability to a boolean named bolTSMSupported. It will then display a toast displaying the touch screen multi-touch ability of the device to the user.
bolTSMSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);
if (bolTSMSupported) {
Toast.makeText(this, "Device has Touch Screen Multi-Touch capability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No Touch Screen Multi-Touch capability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_TOUCHSCREEN_MULTITOUCH
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_TOUCHSCREEN_MULTITOUCH