cubeacon / android-cubeacon-sample

Android Cubeacon Sample Project
12 stars 10 forks source link

No event (onfar, onnear, onentered, etc) detected #9

Closed AdhityaRamadhanus closed 9 years ago

AdhityaRamadhanus commented 9 years ago

I build this sample on android studio and ran it on a device. MainActivity was running but no callback function was executed. I mean, I'm expecting something like "entered beacon", "on near proximity" on logcat but nothing show up. I'm pretty sure that my beacon was detected ( i have registered this beacon on saas) and i see this on logcat "Refresh beacon: {"alert_message":"You have #event in a Beacon : #beacon_name","minor":"011C","brochure":"not set","UUID":"CB10023F-A318-3394-4199-A8730C7C1AEC","groupId":" ","mapId":" ","_id":"a3c9be70-3d94-11e5-8074-22000af5155b","color":"#bd8b88","storyline":"TEXT","name":"Beacon 1","flag_id":2,"alert_title":"Found Beacon","major":"0001"}"

Do you have any suggestions?

alann-maulana commented 9 years ago

Hi @AdhityaRamadhanus ,

Are you already extends the CBActivity class on your activity? Read our complete guidlines here.

Regards.

AdhityaRamadhanus commented 9 years ago

Hi, It turns out that i didn't have any active storyline when i was testing the app but now i have some questions regarding the events detected on CBActivity, you didn't specify how far a device should be to trigger the onentered beacon, onnear, onfar, onexit. One more thing, can i get the distance of a device to the beacons using your SDK?

Best Regards

alann-maulana commented 9 years ago

Sorry, for now it is not possible to get the distance of detected beacon. Soon we will add it to our SDK. From wikipedia, the distance (between transmitting iBeacon and receiving device) is categorized into 3 distinct ranges :

  1. Immediate: Within a few centimeters
  2. Near: Within a couple of meters
  3. Far: Greater than 10 meters away Our SDK are using this 3 categorized distinct ranges of beacon. If your beacon are between that ranges (proximity), it will be trigger the onEnter event. If it is outside or unknown proximity, it will be trigger the onExit event.

Regards.

AdhityaRamadhanus commented 9 years ago

OK, thanks for replying back, really appreciate it. I'll close this issue now