Reputation: 614
How can i check Android tablet using Android app ,if it has sim card (4g) feature or not. since i have created an App that has to perform different Task depending on if it has simcard (4g) phone feature or not.
Upvotes: 1
Views: 233
Reputation: 614
You have to play around with TelephoneyManager to test if it has simcard slot or not . to be exect try below code. more details from here
public static boolean isSimSupport(Context context)
{
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); //gets the current TelephonyManager
return !(tm.getSimState() == TelephonyManager.SIM_STATE_ABSENT);
}
Upvotes: 2