Code example for TelephonyManager

Methods: getSimState

        try { 
            final TelephonyManager telephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
            return telephonyManager.getSimState();  
        } catch (final Exception e) {
            LogUtils.logE("SimCard.getState() - Exception:", e);
        return TelephonyManager.SIM_STATE_UNKNOWN;
     * Tells whether or not the SIM card is present. 
     * @param context the  
     * @return true if the SIM is ready, false otherwise (not ready or absent) 
Connect your IDE to all the code out there  Get Codota for Java