I wanted to disable the functions related to CALL and SMS in my application based on the presence of a SIM card or not. Now the beginners approach to this will check the type of phone using:
if (telephonyManager1.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE)
If true, then supported.
Everything was fine until I came across a Sony Tablet S, which only supports data and message SIM. No voice support. Therefore, for this device, I need to disable only the CALL function, but continue to support SMS. Sony tablet returns TelephonyManager.PHONE_TYPE_NONE, so I can not use the above methods. Besides,
telephonyManager1.getSimState();
returns 1 ie SIM_STATE_ABSENT, which is also the same in the case of HTC FLYER, which does not have support for the SIM equipment itself.
So, is there a way to find out if there is SIM equipment there (regardless of the inserted SIM card or not)?
android telephony tablet
binaryKarmic
source share