Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After few minutes the app does not find any beacon. #137

Open
bkhayargoli opened this issue Mar 24, 2024 · 1 comment
Open

After few minutes the app does not find any beacon. #137

bkhayargoli opened this issue Mar 24, 2024 · 1 comment

Comments

@bkhayargoli
Copy link

I am ranging beacons and it ranges fine, I get the beacon information like:

[Beacon{id: BeaconId{proximityUUID: 01020304-0506-0708-090A-0B0C0D0E0F10, majorId: 256, minorId: 1}, macAddress: 38:CD:CD:9E:03:BC, proximity: Proximity.near, rssi: -44, txPower: -60, accuracy: 0.07879706709651121}]

Yet after some time of running the app, ( the phone is locked and the app is in background but not killed) for like 5 to 10 minutes, I get the following error and they no beacons are detected.

I am running it on android 10, ONEPLUS A5010 device.


I/flutter ( 7686): [Beacon{id: BeaconId{proximityUUID: 01020304-0506-0708-090A-0B0C0D0E0F10, majorId: 256, minorId: 1}, macAddress: 38:CD:CD:9E:03:BC, proximity: Proximity.near, rssi: -44, txPower: -60, accuracy: 0.07879706709651121}]
I/ScanJob ( 7686): Scan job runtime expired: org.altbeacon.beacon.service.ScanJob@e92eb0a
3
D/BluetoothAdapter( 7686): isLeEnabled(): ON
D/BluetoothLeScanner( 7686): could not find callback wrapper
I/flutter ( 7686): [Beacon{id: BeaconId{proximityUUID: 01020304-0506-0708-090A-0B0C0D0E0F10, majorId: 256, minorId: 1}, macAddress: 38:CD:CD:9E:03:BC, proximity: Proximity.near, rssi: -44, txPower: -60, accuracy: 0.07544612653512178}]
I/ScanJob ( 7686): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 7686): Using periodicScanJobId from manifest: 208352940
W/JobInfo ( 7686): Requested interval +5m0s0ms for job 208352940 is too small; raising to +15m0s0ms
W/JobInfo ( 7686): Requested flex 0 for job 208352940 is too small; raising to +5m0s0ms
I/ScanJob ( 7686): ScanJob Lifecycle START: org.altbeacon.beacon.service.ScanJob@3665653
D/ScanHelper( 7686): BeaconParsers set to  count: 1
D/ScanHelper( 7686): First parser layout: m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24
I/CycledLeScanner( 7686): Using Android O scanner
I/ScanJob ( 7686): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 7686): Running immediate scan job: instance is org.altbeacon.beacon.service.ScanJob@3665653
I/ScanJob ( 7686): scanJob version 2.19.5 is starting up on the main process
2
W/ModelSpecificDistanceCalculator( 7686): Cannot find match for this device.  Using default
D/BluetoothAdapter( 7686): isLeEnabled(): ON
I/ScanJob ( 7686): Scan job running for 300000 millis
D/BluetoothAdapter( 7686): isLeEnabled(): ON
D/BluetoothLeScanner( 7686): onScannerRegistered() - status=0 scannerId=5 mScannerId=0
I/flutter ( 7686): No beacons around.
W/DistanceConfigFetcher( 7686): error reading beacon data
W/DistanceConfigFetcher( 7686): java.io.FileNotFoundException: https://s3.amazonaws.com/android-beacon-library/android-distance.json
W/DistanceConfigFetcher( 7686): 	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
W/DistanceConfigFetcher( 7686): 	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
W/DistanceConfigFetcher( 7686): 	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
W/DistanceConfigFetcher( 7686): 	at org.altbeacon.beacon.distance.DistanceConfigFetcher.request(DistanceConfigFetcher.java:94)
W/DistanceConfigFetcher( 7686): 	at org.altbeacon.beacon.distance.ModelSpecificDistanceUpdater.doInBackground(ModelSpecificDistanceUpdater.java:28)
W/DistanceConfigFetcher( 7686): 	at org.altbeacon.beacon.distance.ModelSpecificDistanceUpdater.doInBackground(ModelSpecificDistanceUpdater.java:16)
W/DistanceConfigFetcher( 7686): 	at android.os.AsyncTask$3.call(AsyncTask.java:378)
W/DistanceConfigFetcher( 7686): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/DistanceConfigFetcher( 7686): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/DistanceConfigFetcher( 7686): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/DistanceConfigFetcher( 7686): 	at java.lang.Thread.run(Thread.java:919)
W/ModelSpecificDistanceCalculator( 7686): Cannot updated distance models from online database at java.io.FileNotFoundException: https://s3.amazonaws.com/android-beacon-library/android-distance.json
4
I/flutter ( 7686): No beacons around.

After that I unlock my phone and see the app scans again and beacon is found:


I/flutter ( 7686): No beacons around.
D/DecorView( 7686): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@59749e1[MainActivity]
D/ViewRootImpl[MainActivity]( 7686): windowFocusChanged hasFocus=true inTouchMode=true

I/flutter ( 7686): No beacons around.
D/BluetoothAdapter( 7686): isLeEnabled(): ON
I/flutter ( 7686): No beacons around.
D/BluetoothAdapter( 7686): isLeEnabled(): ON
D/BluetoothLeScanner( 7686): onScannerRegistered() - status=0 scannerId=5 mScannerId=0
I/ScanHelper( 7686): Non-distinct packets detected in a single scan.  Restarting scans unecessary.
I/flutter ( 7686): [Beacon{id: BeaconId{proximityUUID: 01020304-0506-0708-090A-0B0C0D0E0F10, majorId: 256, minorId: 1}, macAddress: 38:CD:CD:9E:03:BC, proximity: Proximity.near, rssi: -50, txPower: -60, accuracy: 0.15620210261951809}]
@PlayCulture
Copy link

Unfortunately this is probably due to Android killing background processes, rather than anything to do with this specific library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants