An integral part of any proximity-based project are the tags that you manage with the Estimote Cloud. They allow you to easily configure any kinds of interactions in your app and, as a result, take advantage of all the features of Proximity SDK.
Every beacon-enabled app scans for beacons so it can trigger some apt interactions when it spots one close by. But knowing that beacon 4224c24b23aa2 was detected nearby, doesn’t really tell you anything. You could try to write a custom backend and link particular identifiers with their physical location (and update it every single time any changes happen). But a far easier way would be to just use tags to add the meaning to beacons and associate them with the points of interests you want to “use” in your app.
Tags
You associate beacons with locations by utilizing tags that you assign to beacons. Your app then starts monitoring for, e.g. the “entrance” tag and beacon(s) associated with it. When it spots one on the horizon, it can trigger all kinds of actions - display a notification, log a visit, notify your staff etc. (more about the possible use cases here). And if for some reason, you need to replace a beacon or move it elsewhere, you simply modify the tags remotely in the Estimote Cloud.
A beacon can have one or multiple tags assigned to it. If you're setting up beacons in a restaurant, you'll probably use tags like "entrance", "bar", "table 1", "table 2", "main_room" and so on. At a supermarket, you'll likely opt for "entrance", "cash desks", "vegetables", "dairy products" or "female clothing" but also "left aisle" or "store X" to differentiate between the beacons. Regardless of the setup, all beacons with the same tag are called a zone.
To give you an example, Martina, our Android developer, likes to tinker with beacons in her free time. These days, she’s working on a simple restaurant app that would welcome guests and show them the menu the moment they settle. Martina set up the following tags on her beacons:
- Beacon1 - “entrance”
- Beacon2 - "table1" & “main_room”
- Beacon3 - “table2” & “main_room”
- Beacon4 - “table3” & “main_room”
- Beacon5 - "table4" & "main_room"
- Beacon6 - "bar"
- Beacon7 - “table5” & “garden”
Her app can now start scanning for particular zones and trigger events when e.g. clients enter them. Say she wants to display a notification saying “Take a seat or visit the garden to get some fresh air” the moment a client enters the zone “main_room”. The event would be triggered the moment a client enters a range of any of the beacons tagged with “main_room” and the notification would be displayed.
let zone = EPXProximityZone(
range: EPXProximityRange(desiredMeanTriggerDistance: 3.0)!, tag: "entrance")
innerZone.onEnterAction = { _ in print("Welcome [name]!") }
innerZone.onExitAction = { _ in print("Please take a seat!") }
There are three types of events that you can monitor for:
- onEnter - when a user enters the range of any of the beacons with a given tag
- onExit - when a user leaves the ranges of all the beacons with a given tag
- onChange - when a user remains within a zone but moves between the beacons (the number of beacons with a given tag that an app hears changes)
You can also scan for the combinations of tags (e.g. "vegetables" & "store X" & "Los Angeles") to trigger exactly the interactions you desire. Or, alternatively, instead of programming the same interaction for each diary department in the country, you could just set interactions to be triggered whenever the "dairy" tag is spotted. That would amount to a lot of time saved as you would no longer need to configure the events for each beacon individually.
On top of that, you can set multiple zones for a single beacon and trigger multiple events with the help of just one device. See the example below:
let innerZone = EPXProximityZone(
range: EPXProximityRange(desiredMeanTriggerDistance: 3.0)!, tag: "bar")
innerZone.onEnterAction = { _ in print("What would you like to order?") }
innerZone.onExitAction = { _ in print("Have a seat!") }
let outerZone = EPXProximityZone(
range: EPXProximityRange(desiredMeanTriggerDistance: 9.0)!, tag: "bar")
outerZone.onEnterAction = { _ in print("Let us know if you need some drinks") }
outerZone.onExitAction = { _ in print("See you next time!") }
The sky's the limit.
Use the Estimote Cloud to remotely change tags on all your beacons without the need to connect to them. Imagine you already configured the beacons for your clients and shipped them to their location thousands of miles away. Using Proximity SDK and the Estimote Cloud, you can reconfigure the tags to enable new interactions or modify the existing ones in a matter of minutes. No need to recompile the app and release a new version. As simple as that!
In the Cloud, you can also sort beacons by tags and easily find the ones you need.
Attachments
While tags are used to define zones and trigger events, attachments are a way to add additional context to a beacon. Imagine you want your app to display a picture or a video the moment an 'enter' event is triggered. Without Proximity SDK, you would need to build, once again, a custom backend for storing such media, essentially adding extra hours to your development time.
With attachments, you can simply reference an attachment key in the app and use it whenever it’s needed, without any extra coding.
Attachments work as key-value storage - so you can keep any kind of data in the format of JSON files and use the key to retrieve it in your app. These files are associated with particular beacons and the moment a specific event (e.g. enter or exit) is triggered, the right JSON (value) is fetched and used in the app.
Think of attachments as asterisks in a book. You see them "attached" to particular words or phrases that need further explaining. At any time, you can stop reading and look up the word/phrase an asterisk is referencing to get some additional context. You then go back to the text, knowing a bit more than you did just moments ago.
Attachments are kind of asterisks that you can add to your beacons to easily manage additional content. Each attachment consists of a key (asterisk) and it's value (the content explaining that particular key). As an example, in a museum, you would use the key "Mona Lisa" that you would then explain with the value of a text with the painting's history and a picture of the author).
You can modify attachments remotely, at any time, in the Estimote Cloud, without interfering in your code in any way.