AltBeacon / android-beacon-library

Allows Android apps to interact with BLE beacons
Apache License 2.0
2.83k stars 834 forks source link

Beacon Scan Result #1145

Closed Spectra6170 closed 1 year ago

Spectra6170 commented 1 year ago

Hello @davidgyoung ,

I used this library particularly in android 13 mobile devices by just implementing dependency in build file. Now when I start connecting Bluetooth devices with Bluetooth Gatt and also my scanner because I updated result with scan range. while using your library once connect with my scanner then running your scanner so Bluetooth range is not maintained. i need that some distance Bluetooth punch with devices can't be accessible but because of your library scanner running my scanner callback not initialized and I cannot able to fetch scan result. can you please help me on this issue?

davidgyoung commented 1 year ago

@Spectra6170, If I understand you correctly, you are saying that you are (a) using this library to scan for beacons and (b) using Android Bluetooth APIs to additionally scan for Bluetooth advertisements. The problem you report is that you do not get callbacks of detections on (b) when (a) is started.

Is this correct? If so, I do not believe there is any fundamental issue here as I have a few different apps that work to do the same thing. The problem is probably something in the details in your app of how you set up the scan where you do not get a callback.

Since this is an issue of troubleshooting a custom app, it is out of scope in this forum, so I will close this issue. I would be happy to assist if you can post details on StackOverflow.com. You would need to include code snippets where you show (a) how you set up beacon scanning with this library (b) how you set up Android API bluetooth scans in your app. (c) Describe in detail when you get the callback to your Android API scan and where n you do not.

If we later find there is some issue requiring some change to this library I will re-open this issue.

Spectra6170 commented 1 year ago

@Spectra6170, If I understand you correctly, you are saying that you are (a) using this library to scan for beacons and (b) using Android Bluetooth APIs to additionally scan for Bluetooth advertisements. The problem you report is that you do not get callbacks of detections on (b) when (a) is started.

Is this correct? If so, I do not believe there is any fundamental issue here as I have a few different apps that work to do the same thing. The problem is probably something in the details in your app of how you set up the scan where you do not get a callback.

Since this is an issue of troubleshooting a custom app, it is out of scope in this forum, so I will close this issue. I would be happy to assist if you can post details on StackOverflow.com. You would need to include code snippets where you show (a) how you set up beacon scanning with this library (b) how you set up Android API bluetooth scans in your app. (c) Describe in detail when you get the callback to your Android API scan and where n you do not.

If we later find there is some issue requiring some change to this library I will re-open this issue.

Hi @davidgyoung I am afraid that i could not explain my problem previously. In Short... On Android 13 (We are using Samsung galaxy m33 5g for testing), when I don't use beacon library and just native BluetoothLEScanner I don't get callback for it. but when I just initialize beacon library and leave it be, my native LEScanner gives me ScanResults. I want to know that what does beacon library do in background that Native LEScanner starts getting results. Now this is my basic problem. Apart from that, LEScanner stops getting advertisement results after some time, even if beacon library is still running.