diff --git a/core/src/main/java/cn/com/heaton/blelibrary/ble/utils/Utils.java b/core/src/main/java/cn/com/heaton/blelibrary/ble/utils/Utils.java index 6c3b4ad..52b5d8e 100644 --- a/core/src/main/java/cn/com/heaton/blelibrary/ble/utils/Utils.java +++ b/core/src/main/java/cn/com/heaton/blelibrary/ble/utils/Utils.java @@ -61,23 +61,4 @@ public static boolean isPermission(Context context, String permission) { return Build.VERSION.SDK_INT < Build.VERSION_CODES.M || ContextCompat.checkSelfPermission(context, permission) == PERMISSION_GRANTED; } - public static void reqBlePermission(Context context) { - List mPermissionList = new ArrayList<>(); - // Android 版本大于等于 12 时,申请新的蓝牙权限 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - mPermissionList.add(Manifest.permission.BLUETOOTH_SCAN); - mPermissionList.add(Manifest.permission.BLUETOOTH_ADVERTISE); - mPermissionList.add(Manifest.permission.BLUETOOTH_CONNECT); - //根据实际需要申请定位权限 - //mPermissionList.add(Manifest.permission.ACCESS_COARSE_LOCATION); - //mPermissionList.add(Manifest.permission.ACCESS_FINE_LOCATION); - } else { - mPermissionList.add(Manifest.permission.ACCESS_COARSE_LOCATION); - mPermissionList.add(Manifest.permission.ACCESS_FINE_LOCATION); - } - - - - } - }