-
Notifications
You must be signed in to change notification settings - Fork 837
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
the altBeacon library does not update the Live Data object #1211
Comments
Regarding this " I also noticed this problem in the example application (beaconreferenceapplication) in the library (altbeacon)" Did you test with the official Kotlin reference app? You should see it give a callback to the ranging observer every ~ 1 second here: The monitoring observer, however, is expected to get exactly one callback when the beacon appears, and one again when it disappears: Is this not what you see? |
yes i tested with the official library app and i get only one iBeacon device. in the diary I see that the monkeys ignore them, I think they are other types of devices, the only difference between my project and the official one is that for me it is not through a simple list but through an adapter. Below is the code from my project. package org.altbeacon.beaconreference import android.app.* class BeaconReferenceApplication: Application() {
} activity that starts scanning and displays them package org.altbeacon.beaconreference import android.annotation.SuppressLint class ListDevices : AppCompatActivity() {
//bluetoothServices = BluetoothServices(this)
private val monitoringObserver = Observer {state -> private val rangingObserver = Observer<Collection> {beacons ->
val beaconManager = BeaconManager.getInstanceForApplication(this)
} this is the display adapter from recyclerview package org.altbeacon.adapters import android.content.Context class BleDevicesAdapter (private val context: Context, private val devices: MutableList = mutableListOf(), private val onItemClick: (IBeacon) ->Unit) : RecyclerView.Adapter<BleDevicesAdapter.ViewHolder>() {
// notifyDataSetChanged() } |
Hey @G-Roman1988, I'd like to help, but this is not the proper forum for troubleshooting a custom app. The comment above shows 354 lines of code, which is beyond the scope of what we can do here. Two suggestions:
|
Hei @davidgyoung Me too please help me today I will open an issue/question on StackOverflow.com. and when it's published I'll leave a link to the StackOverflow.com question here, if you could help me I'd be grateful. |
Hello @davidgyoungȘi!this is the link to the stackoverflow question https://stackoverflow.com/questions/79204838/altbeacon-library-not-updating-livedata-with-multiple-ibeacon-devices . please help me |
I have integrated the altBeacon library in my project and it does not update the live data object, it finds an IBeacon device if there are many IBeacon devices nearby, it does not identify them or update the live data. I also noticed this problem in the example application (beaconreferenceapplication) in the library (altbeacon). I noticed that the library depends on a version of other dependencies (libraries). and what libraries and versions are required? where can I read what versions I need for the required dependencies (libraries)? ### Expected behavior
to find each device and update live data.
Actual behavior
finds an ibeacon device and further finds nothing.
Steps to reproduce this behavior
integrate altbeacon library into project, start scanning with foreground service and read data from live data or compile examples from library and runazo having multiple ibeacon devices nearby (more than 1).
Mobile device model and OS version
google pixel 9 pro android 15 and samsung a50 android11
Android Beacon Library version
V2.20 and with V2.20.6 same result
IMPORTANT: This forum is reserved for feature requests or reproducible bugs with the library itself. If you need help with using the library with your project, please open a new question on StackOverflow.com.
The text was updated successfully, but these errors were encountered: