获取Android设备id

 //获取设备id相关
    @SuppressLint("MissingPermission")
    public static String getSN() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            return Build.getSerial();
        } else {
            return Build.SERIAL;
        }
    }

 

posted @ 2021-05-06 10:37  寒水易兮萧萧风  阅读(521)  评论(0编辑  收藏  举报