Beacon cannot be scanned in Android 12
Coding-Farmer-tao opened this issue · 3 comments
Coding-Farmer-tao commented
hello!
I use the slim variant of the plugin (instructions) and remove the android:usesPermissionFlags="neverForLocation",then this application cant scan any device.When i add he android:usesPermissionFlags="neverForLocation", it works fine but can
t find beacon.
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" />
<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" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
thank you!
Coding-Farmer-tao commented
When I install this app on an Android 8 device, it works fine and scans for beacon devices.
peitschie commented
Are you requesting ACCESS_LOCATION_FINE permissions at runtime? You'll need to do this manually using a plugin such as https://github.com/dpa99c/cordova-diagnostic-plugin
Coding-Farmer-tao commented
that is right,thank you for your reply!