Code example for TelephonyManager

Methods: getSubscriberId

0
             
            try { 
                 
                final TelephonyManager mTelephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
                 
                return mTelephonyManager.getSubscriberId(); 
     
            } catch (final Exception e) {
                 
                LogUtils.logE("SimCard.getSubscriberId() - Exception: "+e);
            } 
        } 
        return SIM_CARD_NOT_READABLE;
    } 
     
    /** 
     * Logs a MSISDN validation failure event to Flurry. 
     * 
     * @param context Android context. 
     * @param workflow Given work flow (either sign in or sign up). 
     * @param status Current status string.