Check If an Android Device supports Call Making
by Sasikumar[ Edit ] 2013-10-08 14:43:51
Check if an android device supports making call using the following code :
Step 1: Add the following code to
AndroidManifest.xml file
<uses-feature android:required="true" android:name="android.hardware.telephony" />
Step 2: In the required
activity class add the following code:
if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY))
{
// Your Device Supports Making Call.
Toast.makeText(getApplicationContext(), "Your Device Supports Making Call", Toast.LENGTH_LONG).show();
}
else
{
// Your Device Doesn't Supports Making Call.
Toast.makeText(getApplicationContext(), "Your Device Doesn't Supports Making Call.", Toast.LENGTH_LONG).show();
}
This will be handy when your providing option for the user to make call from your Android Application.