Open brunoshine opened 3 years ago
I had the same problem and solved using uppercase UUID.
6a84c716-0f2a-1ce9-f210-6a63bd873dd9
--> this does not work.
6A84C716-0F2A-1CE9-F210-6A63BD873DD9
--> this works !
Hi @dariocavada thank you for your reply but replacing for uppercase did not worked for me. Still not showing the beacons of the raging event nor on the monitoring. :/
Can you try to (manually) add Location permission to "ALWAYS" for your app ?
BEFORE : no beacon when ranging (normal location permission dialog does not show the "Always" setting in my case, but only "when in use") AFTER after manually setting this : got my beacon in the ranging results.
It seems that using very recent versions of SDK, using flutter_beacons requires the location permission at "ALWAYS" level and and those permissions in manifest :
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
1 year ago -don't ask me which version I was using back then- I did not have this issue I'm just using this app in a Demo, so this is no big deal for me, but I guess a number of users other than you and me have met this limitation ?
The SDK11 is a little ambiguous regarding how to properly get background location setting to work but I guess in the case of beaconning this seems to be mandatory. see https://developer.android.com/training/location/background for details
Hope this helps !
I have the same error with the targetSdkVersion 30, but if I use the version 28 it works...
Unfortunately The Play Store wants the targetSdkVersion 30 ...
//compileSdkVersion 30
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.flutter_beacon_example"
minSdkVersion 18
//targetSdkVersion 30
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
SOLVED:
as mentioned here: #
https://altbeacon.github.io/android-beacon-library/
for version 30 (Android 10, 11) is necessary to add manually ACCESS_FINE_LOCATION
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
or if you want also background scanning:
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
@brunoshine i have the same code as you (with my uuid of course) but i cannot get the rssi, it always return 0
[{"proximityUUID":"253623D3-D090-B787-1744-DDFE8B6F6D6B","major":15,"minor":1,"rssi":0,"accuracy":-1.0,"proximity":"unknown"}]
version flutter_beacon: ^0.5.1 i followed as the example (https://pub.dev/packages/flutter_beacon), am i missing a permission?
<!-- When in use -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>Reason why app needs location</string>
<!-- Always -->
<!-- for iOS 11 + -->
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Reason why app needs location</string>
<!-- for iOS 9/10 -->
<key>NSLocationAlwaysUsageDescription</key>
<string>Reason why app needs location</string>
<!-- Bluetooth Privacy -->
<!-- for iOS 13 + -->
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Reason why app needs bluetooth</string>
any idea?
Hi,
I've created a simple app, that works on iOS device (ranging and monitoring events are triggered) but does not work on android device, as beacons are active, monitoring does not get called (no logs) and ranging reports empty beacons array.
Any thoughts on what might be happening? thanks.
iOS result:
Android result:
code: