Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device supports SIP-based VOIP.
Constant Value: "android.software.sip.voip"
1. Get a PackageManager Instance named myPackageManager.
Constant Value: "android.software.sip.voip"
1. Get a PackageManager Instance named myPackageManager.
2. Create a Boolean Variable named bolVOIPSupported.
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 SIP-based VOIP availability to a boolean named bolSIPSupported. It will then display a toast displaying the SIP-based VOIP availability of the device to the user.
bolVOIPSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_SIP_VOIP);
if (bolVOIPSupported) {
Toast.makeText(this, "Device supports SIP-based VOIP", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "Device does NOT support SIP-based VOIP!", Toast.LENGTH_LONG).show();
}
5. Compile and run!
Resources:
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_SIP_VOIP
http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_SIP_VOIP