enableBeaconManager = Firebase Auto Update? is this possible?

Hey there, does anyone know if it would be possible to trigger a value change in Firebase database when Android app comes within range of beacon?

(ie) user walks up to counter…beacon sends signal to app…app sends value change in Firebase database associated with users account.

Would this be possible? I am have been messing around with trying to get this to work for the past few days with no success. Thought I would as the community question for any help?

-Sx3indy

Hi, yes it’s possible. Do you have some issue with Beacon or firebase listener?

When
your app go into the beacon zone the setTelemetryListener() return info
about your beacon and you could write some Firebase Value as “true”. If
setTelemetryListener doesn’t return info about your icon you could
write Firebase value as “false”.

Moreover, only write when values change not anytime.

Regards,
Martin

Sheww! Glad to know that it it possible. Thank you for your quick answer Martin. I was about to give up! I am not sure if it’s my childEventListener or the beacon range? My goal was to have the beacon add +numerical value to child in Firebase when when the beacon is in range. Maybe I should try onCreate to handle the event in firebase?

In my opinion, you have to do the firebase insert inside the beacon listener.