Question

I want to know that how to check that phone call service is enable or not in different devices, i have Micromax Funbook(p300) Tablet(Android 4.0.3), in which there is no calling service, and i am using below code to check that

TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);   
if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE) {
    Log.v("TAG", "No calling service");
}else{
    Log.v("TAG", "calling service");
}

but this is not working. it always gives message calling service only.

Any help?

Was it helpful?

Solution

If calling service is not supported by tablet, google play won't allow the app to be installed on that tablet. Google Play internally checks for permissions which are supported by your device and the permissions the app is asking for, if they do not match, the app is shown as not compatible with your device. EDIT: Hence of course, you do not need to check if calling is supported by that device or not...

OTHER TIPS

Try this, if device doesn't have facility to make voice call then it must not be a phone.

TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String ableToMakePhoneCalls = tm.getVoiceMailNumber(); 

//check device for voicemail number (null means no voicemail number).
if(ableToMakePhoneCalls == null)
{ 
     //If the device does not have voicemail, then it must not be a phone. So it can't call. 
}   
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top