Remove a beacon from ProximityObserver

Let’s say i have an app that monitor a beacon xyz. After few days i want to remove beacon xyz from getting monitored in my app. How do i do that? How do i remove an already existing beacon in ProximityObserver?

This is critical for my application, so please let me know asap.

Hey @vamsichalla

This one is pretty easy - the ProximityObserver triggers your action when the scanned beacons around you have matching ProximityAttachments to the one of the zones you defined. So let’s say, you have 3 beacons with proximity attachment venue:my_super_shop assigned, and after a couple of days you want to remove one of those beacons. The solution is simple - just visit our cloud, go to the beacon settings and remove this attachment from the beacon of your choice. Next time the ProximityObserver starts, it won’t be triggered by this beacon anymore :slight_smile: No app changes needed :slight_smile:

Cheers!
Paweł

Hi @paweldylag,

Ok, what if i don’t want to do it using cloud. Is there a way, where i can remove them programmatically?

Here is my scenario:
We have a backend where we map a set of beacons to each meeting.

Beacon 1, 2, 3 - Meeting 1 - on Day 1
Beacon 4, 5, 6 - Meeting 2 - on Day 2
and so on…

I want my app to monitor beacons based on Day.
So, on Day 1, the app tracks Beacons 1, 2, 3
and on Day 2 the app only tracks Beacons 4, 5, 6 but not 1, 2, 3.

So, what i want is, considering that i have logic to get each day’s beacons from my backend, I want to clear all ProximityZones and create them based on that day’s beacons.

How can i do this?

You can always stop the current observation, and build the new PO with the new zones (fetched from your backend). The whole idea behind our ProximityObserver is to avoid having states, so there is no option to dynamically add/remove zones.

You should assign attachments to your beacons that can easily identify groups of them, and let your backend provide the needed set of zones for the given day. Like, let’s say, on Monday, proximity observer should be started with zone key:value “meeting_room:yellow” (and let’s say beacons 1,2, 3 share this attachment), and on Thursday the zone should be “meeting_room:green” (again, beacons 4, 5, 6 have this attachment in our cloud).

Let me know if that helps a little :slightly_smiling_face: