Developing an Advertising App using Estimote Beacon

I am new to Estimotes. Developing an Advertising app, where I would like to display an Ad/Offer to the client as soon as he is gets near to the Beacon. My Question:
1. Should I be using Monitoring or Ranging for the sampe.
2. In My current Implementation - Using Monitoring, it displays the offer the first time for the nearest beacon. When I move to other region, or near to other beacon. It don't displays the Offer/Ad again unless I start the app on the device again.
3. How do I make sure that my app is active and is running on the background.

Thanks a lot in advance for your help and guidance.

Hi Anshuman,

The app will be in the background for as long as you don't kill it entirely. However, keep in mind that it's only able to keep region monitoring then. It need to be in the foreground (active) to be ranging the beacons.

The difference between ranging and region monitoring is described in detail here: https://community.estimote.com/hc/en-us/articles/203356607-What-are-Region-monitoring-and-Ranging-

Cheers.

Thanks for the response. I am still have few confusions about Monitoring and Ranging. They are following. Hope you might be able to help me out here.

Monitoring:
1. What I have observed, that Monitoring happens only once. I mean when the onEntered even is fired. If In case, I have 3 beacons within the range, very near to each other. How does, I will Identify which one is the nearest one?
2. when the end user moves away from the beacon and now, say Beacon 2 becomes the nearest one. Which even will be triggerred as the OnEntered even will not be triggerred this time.

3. Using above 2 points, I am trying to show the user the offers, depending on which beacon he is nearest to.

Ranging:
As mentioned on the site "Ranging allows apps to know the relative distance between a device and beacons. This can be very valuable. Consider for example of an indoor location app of department store. The app can determine which department (such footwear, clothing, accessories etc) is closest by."

1. How does, I make sure as to which Beacon is the nearest one.

2. Also, I want to show the notification only for say 3 seconds and not more. How can I restrict that the for the same beacon (nearest one), I am not displaying the offer again and again.

Last but not the least. If there some sample app which can help me providing the answers? I have seen the Demo app and its code, but that doesn't help much.

Quick example: how do I Identify as to which is the nearest beacon?

Looking forward to your support.

First please read our introduction to monitoring and ranging: https://community.estimote.com/hc/en-us/articles/203356607-What-are-Region-monitoring-and-Ranging-

Regarding your problems with monitoring. Monitoring API is designed to detect when user enters or exits the region (note that single region can consist of multiple beacons). It depends how you defined your region.

Regarding ranging. When you start ranging, you get back a list with beacon sorted by distance from the device. This is what you are looking for.