Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device supports adding new input methods implemented with the InputMethodService API.
Constant Value: "android.software.input_methods"
Constant Value: "android.software.input_methods"
1. Get a PackageManager Instance and save to myPackageManager.
2. Create a Boolean Variable named bolInputSupported.
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 new input method support ability to a boolean named bolInputSupported. It will then display a toast displaying the new input method support ability on the device to the user.
bolInputSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_HOME_SCREEN);
if (bolInputSupported) {
Toast.makeText(this, "Device has new input method support ability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No new input method support ability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_INPUT_METHODS
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_INPUT_METHODS