详细内容可参考官方文档
Android 12 中可以不用位置权限进行蓝牙扫描了,蓝牙扫描改用新的权限:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" tools:targetApi="s" />
但是!!!
扫描 Beacon 类的广播还是需要精准位置权限,就不要声明 neverForLocation 了!