AppUtil.java 文件源码

java
阅读 41 收藏 0 点赞 0 评论 0

项目:ViewDebugHelper 作者:
/**
 * get the current version of current application
 */
public static String getImei( Context context) {
    if (TextUtils.isEmpty(imei)) {
        if(context.checkCallingOrSelfPermission( Manifest.permission.READ_PHONE_STATE)== PackageManager.PERMISSION_GRANTED){
            TelephonyManager tm = (TelephonyManager) context.getApplicationContext()
                    .getSystemService(Context.TELEPHONY_SERVICE);
            imei = tm.getDeviceId();
        }
    }
    return imei;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号