Closed johnkennethfurog closed 1 year ago
I have the same issue, react-native 0.59.10. Any ideas what's wrong?
You should also scan for Secure Profile where you will get the Unique ID. I encourage you to visit the https://developer.kontakt.io/hardware/packets/secureprofile/
Also, you will get the UniqueID when it came with Secure Response.
Hello everyone. @MKacikKontakt was right!:) To retrieve uniqueId and other meta info (e.g. battery level, firmware revision etc) you need to add SECURE_PROFILE argument into your connect
method invokation and listen for "profile*" events.
Thanks for writing this here @sergeylaptev !
Do you want to add it to the documentation, perhaps as a comment in this code-block here right next to uniqueId
?
https://github.com/Driversnote-Dev/react-native-kontaktio/blob/master/docs/api.android.md#beacon--eddystone
@kirantripathi I'm not using the package in my current projects atm so I didn't yet test it with RN 0.63 ... You don't get any errors, do you?
I was trying to run minimal code but it is not returning any beacon information. @johnkennethfurog @sergeylaptev is your basic setup to scan the beacon different than the minimal code example. I try with minimal code example but got nothing as response
Hello everyone. @MKacikKontakt was right!:) To retrieve uniqueId and other meta info (e.g. battery level, firmware revision etc) you need to add SECURE_PROFILE argument into your
connect
method invokation and listen for "profile*" events.
Does anyone know wow do we listen for profile events? I'm only seeing listeners for beacons and eddystone appear/update/disappear. What's the name of the listener for onProfilesUpdate
? I don't see an example using SECURE_PROFILE
in the docs. What am I missing? Thank ya!
@MKacikKontakt can you provide any guidance here?
Hello guys, As Android 10 has introduced the new requirement of permission, please request "ACCESS_FINE_LOCATION" instead of the "ACCESS_COARSE_LOCATION" in your code. I just made this change and it works on Android 10 and 11 devices again.
don't forget to add \<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> into ApplicationManifest.xml file
Ref: https://altbeacon.github.io/android-beacon-library/requesting_permission.html
Hello everyone. @MKacikKontakt was right!:) To retrieve uniqueId and other meta info (e.g. battery level, firmware revision etc) you need to add SECURE_PROFILE argument into your
connect
method invokation and listen for "profile*" events.Does anyone know wow do we listen for profile events? I'm only seeing listeners for beacons and eddystone appear/update/disappear. What's the name of the listener for
onProfilesUpdate
? I don't see an example usingSECURE_PROFILE
in the docs. What am I missing? Thank ya!@MKacikKontakt can you provide any guidance here?
Hi @noblepaper
I am not sure if you have fixed your issue. For Android, I am using profileDidAppear/profileDidUpdate/profileDidDisappear events to get the uniqueId,
RN Version : 0.62.2 react-native-kontaktio Version: ^2.7.2
to detect beacons I am using this code :
upon detecting the beacon, the uniqueId is null :
beaconDidAppear {"accuracy": 0.12086380610771207, "address": "CD:D4:F2:28:2E:E1", "batteryPower": -1, "firmwareVersion": "-1", "isShuffled": false, "major": 36652, "minor": 28539, "name": null, "proximity": "IMMEDIATE", "rssi": -68, "txPower": -84, "uniqueId": null, "uuid": "f7826da6-4fa2-4e98-8024-bc5b71e0893e"}
is there any setup that needs to be done aside from what is listed on the documents for me to obtain the uniqueId?