Monitoring

I want to monitor the beacons for notification, whenever I am in the range of the beacon, I want to respond to that beacon, then I want to exclude it from the the range I am listing for, so I have to stop the monitoring and start new monitoring by excluding the previous one

is it a good practice to be done?

Regards

Sorry, It was a wrong question,

The question is, let us say we are listening to some beacons defined by their udid, major, minor, and once the user get in the range of one of the beacons he will be notified, and My app want to stop listen to any notification from that specific beacon.

how to achieve that, anybody knows or can give a hint?

Regards

Hi,

You could have an individual beacon region for each beacon you're monitoring, then the only thing you'll need to do in the didEnterRegion delegate is stop monitoring for this particular beacon.

Just keep in mind iOS enforces a limit of 20 beacon regions to be monitored at a time.

Oh, thanks for the clarification, looks like you're already doing what I mentioned above. Yes, this is a perfectly fine approach, any problems you're encountering?

Dear Piotr,
I know that I can listen to multiple region, but my issue is that I have to listen to more than only 20 beacons, and if any beacon has been identified already, I don't want to bother the customer by receiving any notification related to that beacon.

Is there a way to do that, Is it enough just to cancel the responding in the did enter delegate method, this method should be called even if the app is not working right?

sorry if my understanding is wrong, please correct me.

Regards

Hi,

Yeah, another approach is—always listen for all the beacons, and in the didEnterRegion simply figure out if the user already got a notification or not, and based on that decide whether to show it or not.

Ok, that seems to be better :)

Thanks Dear.

Ohh,
I tried that, but didenter delegate is not giving the access to the beacon but only to the region info, so incase my region contain multiple beacons, I will not be able to know which beacon I am currently near to.

When didEnter gets called, and your app is in the background, it still gets ~10 seconds of execution time, so you can start ranging and see which beacons are nearby.

It seems to be the only way, I am wondering why we are not able to have an access to the beacon which trigger the area entering delegate, Technically, I know even apple are not giving this api access, but Why :)

Thanks again Piotr.

Ha, interesting. I noticed that sometimes beacons tend not to be detected in the first few calls to didRangeBeacons, they only show up after a few seconds. Considering you get 10 seconds of execution time, might be worth keeping ranging running for a few seconds and see if this helps detect the beacon.