获取手机设备信息

      DisplayMetrics displayMetrics = new DisplayMetrics();
        this.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
        int height = displayMetrics.heightPixels;
        int width = displayMetrics.widthPixels;
        String sdk = android.os.Build.VERSION.RELEASE;
        String device = Build.MODEL;
        TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(
                Context.TELEPHONY_SERVICE);
        UUID deviceUuid = new UUID(android.provider.Settings.Secure.getString(getContentResolver(),
                android.provider.Settings.Secure.ANDROID_ID).hashCode(), ((long) tm.getDeviceId()
                .hashCode() << 32) | tm.getSimSerialNumber().hashCode());
        final String uniqueId = deviceUuid.toString();
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页