Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device's audio pipeline is low-latency, more suitable for audio applications sensitive to delays or lag in sound input or output.
Constant Value: "android.hardware.audio.low_latency"
1. Get a PackageManager Instance named myPackageManager.
Constant Value: "android.hardware.audio.low_latency"
1. Get a PackageManager Instance named myPackageManager.
2. Create a Boolean Variable named bolLLSupported.
3. Set the Minimum and Target SDK version to 9 or greater.
4. In the onCreate method, add the below code. This will return the low-latency ability to a boolean named bolLLSupported. It will then display a toast displaying the low-latency ability of the device to the user.
bolLLSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
if (bolLLSupported) {
Toast.makeText(this, "Device has low-latency capability", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No low-latency capability!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_AUDIO_LOW_LATENCY