SlideShare a Scribd company logo
Davide Piccardi
Linkedin: https://it.linkedin.com/in/davide-piccardi-8b3950105
Github: https://github.com/davidepic91
Sapienza University of Rome – DIAG – Pervasive Systems
Estimote beacons and simple Android application
What are Estimote beacons ?
Estimote Beacons and Stickers
are small wireless sensors that
you can attach to any location or
object.
In practice they are small
computer: they have an ARM
processor, memory, Bluetooth
smart module, coin battery,
temperature and motion sensors.
What are Estimote beacons ? (cond't)
Thanks to the Estimote SDK, we
can interact with these devices
and build a new type of
applications that are able to
understand their proximity to
nearby locations and objects,
recognizing their type,
temperature and motion.
How do they work ?
• They broadcast tiny radio signals
through built-in antennas.
• Smart devices in range receive
those signals and compatible
installed apps can then respond.
• The exact form of that response
(notification or another action)
depends on the type of app. Of
course, in accordance with the
principles of IoT it is possible to
show data retrieved from our
personal cloud.
How many types of devices exist ?
There are three types of devices:
• Location Beacon
• Proximity Beacon
• Sticker Beacon
They are fully compatible with iOS and Android.
Of course which one to choose it depends on the type of
project you intend to implement.
Location beacon
It is the most robust Bluetooth Smart
beacon on the market.
• Built-in sensors (temperature,
motion, light, magnetometer)
• 7 years default battery life
• Water resistant and eco-friendly
reusable enclosures
• iBeacon™,Eddystone™ and Indoor
Location compatible
Proximity beacon
• ARM M0 Cortex, BLE, motion &
temperature sensors
• Omnidirectional antenna with
configurable range
• 3 years default battery life
• iBeacon™,Eddystone™ and Indoor
Location compatible
Sticker beacon
It is a cost-effective prototyping kit
for nearables.
• ARM M0 Cortex, BLE, motion &
temperature sensors
• 1 year default battery life
• Thin and waterproof enclosure
with built-in adhesive layer
• iBeacon™ and Indoor Location
(partially) compatible
FAQ: beacons and stickers
• What is the difference between Beacons and Stickers?
Beacons have a bigger battery and are designed for venues
like retail stores, museums or airports.
Stickers can turn things into "nearables" i.e. smart objects
fully detectable by your mobile device.
• What is a Beacon's range?
The typical range of Bluetooth low-energy (BLE) radio
modules is up to 70 m (230 ft.). Of course, it depends on
the location, because radio signals could be absorbed or
diffracted.
FAQ: beacons and stickers (cond't)
• Can Estimotes be placed outdoors?
The case made of soft silicone is waterproof. You can
install them outdoors but rain will reduce the beacon's
signal strength and extreme temperatures (over 60°C or
below -10°C ) can reduce battery life.
What are the practical application of beacons ?
Restaurant: passing near the
entrance you see a notification on
your phone showing the daily
specials and reviews.
Clothing store: for each nearby
product show on phone some
information like price, sizes in stock
and other colors available.
What are the practical application of stickers ?
Bicycle: automatically track your routes
and record where you left it.
Plants: taking advantage of the phone's
sensor, show in real time if there is
enough light for that specific plant
whose information is retrieved from
the cloud.
Development technologies
Beacon is only a piece of hardware broadcasting radio signal.
On top of that, there are different APIs, SDKs, and protocols
that you will be using to bring micro location to your apps.
• Estimote SDKs
There are two different versions for iOS and Android.
• Estimote Indoor SDK
It is a set of tools for building precise
location services indoors.
▪ Available only for iOS.
Development technologies (cond’t)
• iBeacon ™
It is a Bluetooth 4.0 communication protocol developed by
Apple. It is supported by iOS devices only.
▪ Available as part of the Estimote iOS SDK.
• Eddystone ™
It is the equivalent of the previous one but it is developed
by Google. It is supported by both iOS and Android devices.
▪ Available as part of the Estimote iOS and Android SDK.
Development technologies (cond’t)
• Estimote Cloud
It is a web-based platform that allows us to remotely
access settings and locations of beacons.
Moreover, it exposes a public RESTful API that enables us
(in simple a programmatic way) to:
• fetch data about our beacons
• use Estimote Analytics
• use Fleet Management API
• integrate Estimote Cloud with your own backend
Important concepts for developers
Beacon region
We can see it as a filter or a regular expression. In particular, it allows us to
determine what devices we are interested.
In fact each beacon is identified by three values:
• UUID (String) e.g. “B9407F30-F5F8-466E-AFF9-25556B57FE6D”.
• major number (unsigned short integer), i.e., an integer ranging from 1 to
65535.
• minor number (unsigned short integer) like the major number.
There are several combinations of these parameters that we can specify in the
region: UUID + major + minor, UUID + major, UUID alone, or none of it.
Important concepts for developers (cond’t)
Beacon monitoring
We can think of beacon monitoring as
“geofence”, or in other words, as a
virtual barrier (usually defined using
geographic coordinates).
Moving in and out of this area, “enter”
and “exit” events are generated and
apps can react to them (events usually
take up only 30 seconds to trigger).
Important concepts for developers (cond’t)
Beacons ranging
While monitoring creates a virtual fence to
detect when you are moving in and out,
ranging actively scans for any nearby
beacons and delivers results to us every
second then we can get a full list of
matching beacons currently in range
(complete with their UUID, major, and
minor values).
Important concepts for developers (cond’t)
Proximity estimation
The receiver can estimate the distance by
analyzing the power of the Bluetooth signal
received. It can also categorize the beacons into
four proximity zones:
• immediate (strong signal ! a few centimeters)
• near (medium signal ! up to a few meters)
• far (weak signal ! more than a few meters)
• unknown (very weak signal ! “hard to say”)
There is also another, more distinct feature of ranging:
Demonstration: simple restaurant Android app
I have made a simple Android application to show the use of
Estimote beacons.
• Name: Notification Restaurant Beacon
• Purpose: notify the daily menu of a restaurant
• Topic: beacon monitoring
• Cloud: None (for simplicity)
• Used technologies: Estimote SDK for Android
• Tested on: Nexus 5 with Android 6.0.1
• GitHub repository: https://github.com/davidepic91/
NotificationRestaurantBeacon.git
Simple restaurant Android app (cond’t)
1. Open your own QR code reader or download and
install "QR Code Reader" from Play Store. In the
second case, go to setting and disable " Use the in-
app browser“
2. Read the QR code
3. Open URL
4. Click on the button in the upper right
5. Click on "direct download" and confirm with "ok“
6. Go to phone settings and enable the installation of
apps from unknown sources
7. Open .apk file from "Download" and install it.
8. Open the application
In order to try the app, you can follow these steps:
Simple restaurant Android app (cond’t)
@Override

public void onCreate() {

super.onCreate();



//ADD A BEACON MANAGER

beaconManager = new BeaconManager(getApplicationContext());



//START MONITORING

beaconManager.setMonitoringListener(new BeaconManager.MonitoringListener() {

@Override

public void onEnteredRegion(Region region, List<Beacon> list) {

showNotification("Restaurant AL VIALETTO", "Click for the dishes of the day");

}

@Override

public void onExitedRegion(Region region) {

}

});

beaconManager.connect(new BeaconManager.ServiceReadyCallback() {

@Override

public void onServiceReady() {

beaconManager.startMonitoring(new Region("monitored region",

UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"), 17957, 56571));

}

});

}
Code from
MyApplication.java
Simple restaurant Android app (cond’t)
Simple restaurant Android app (cond’t)
That’s all !

More Related Content

Estimote beacons and simple Android application (full)

  • 1. Davide Piccardi Linkedin: https://it.linkedin.com/in/davide-piccardi-8b3950105 Github: https://github.com/davidepic91 Sapienza University of Rome – DIAG – Pervasive Systems Estimote beacons and simple Android application
  • 2. What are Estimote beacons ? Estimote Beacons and Stickers are small wireless sensors that you can attach to any location or object. In practice they are small computer: they have an ARM processor, memory, Bluetooth smart module, coin battery, temperature and motion sensors.
  • 3. What are Estimote beacons ? (cond't) Thanks to the Estimote SDK, we can interact with these devices and build a new type of applications that are able to understand their proximity to nearby locations and objects, recognizing their type, temperature and motion.
  • 4. How do they work ? • They broadcast tiny radio signals through built-in antennas. • Smart devices in range receive those signals and compatible installed apps can then respond. • The exact form of that response (notification or another action) depends on the type of app. Of course, in accordance with the principles of IoT it is possible to show data retrieved from our personal cloud.
  • 5. How many types of devices exist ? There are three types of devices: • Location Beacon • Proximity Beacon • Sticker Beacon They are fully compatible with iOS and Android. Of course which one to choose it depends on the type of project you intend to implement.
  • 6. Location beacon It is the most robust Bluetooth Smart beacon on the market. • Built-in sensors (temperature, motion, light, magnetometer) • 7 years default battery life • Water resistant and eco-friendly reusable enclosures • iBeacon™,Eddystone™ and Indoor Location compatible
  • 7. Proximity beacon • ARM M0 Cortex, BLE, motion & temperature sensors • Omnidirectional antenna with configurable range • 3 years default battery life • iBeacon™,Eddystone™ and Indoor Location compatible
  • 8. Sticker beacon It is a cost-effective prototyping kit for nearables. • ARM M0 Cortex, BLE, motion & temperature sensors • 1 year default battery life • Thin and waterproof enclosure with built-in adhesive layer • iBeacon™ and Indoor Location (partially) compatible
  • 9. FAQ: beacons and stickers • What is the difference between Beacons and Stickers? Beacons have a bigger battery and are designed for venues like retail stores, museums or airports. Stickers can turn things into "nearables" i.e. smart objects fully detectable by your mobile device. • What is a Beacon's range? The typical range of Bluetooth low-energy (BLE) radio modules is up to 70 m (230 ft.). Of course, it depends on the location, because radio signals could be absorbed or diffracted.
  • 10. FAQ: beacons and stickers (cond't) • Can Estimotes be placed outdoors? The case made of soft silicone is waterproof. You can install them outdoors but rain will reduce the beacon's signal strength and extreme temperatures (over 60°C or below -10°C ) can reduce battery life.
  • 11. What are the practical application of beacons ? Restaurant: passing near the entrance you see a notification on your phone showing the daily specials and reviews. Clothing store: for each nearby product show on phone some information like price, sizes in stock and other colors available.
  • 12. What are the practical application of stickers ? Bicycle: automatically track your routes and record where you left it. Plants: taking advantage of the phone's sensor, show in real time if there is enough light for that specific plant whose information is retrieved from the cloud.
  • 13. Development technologies Beacon is only a piece of hardware broadcasting radio signal. On top of that, there are different APIs, SDKs, and protocols that you will be using to bring micro location to your apps. • Estimote SDKs There are two different versions for iOS and Android. • Estimote Indoor SDK It is a set of tools for building precise location services indoors. ▪ Available only for iOS.
  • 14. Development technologies (cond’t) • iBeacon ™ It is a Bluetooth 4.0 communication protocol developed by Apple. It is supported by iOS devices only. ▪ Available as part of the Estimote iOS SDK. • Eddystone ™ It is the equivalent of the previous one but it is developed by Google. It is supported by both iOS and Android devices. ▪ Available as part of the Estimote iOS and Android SDK.
  • 15. Development technologies (cond’t) • Estimote Cloud It is a web-based platform that allows us to remotely access settings and locations of beacons. Moreover, it exposes a public RESTful API that enables us (in simple a programmatic way) to: • fetch data about our beacons • use Estimote Analytics • use Fleet Management API • integrate Estimote Cloud with your own backend
  • 16. Important concepts for developers Beacon region We can see it as a filter or a regular expression. In particular, it allows us to determine what devices we are interested. In fact each beacon is identified by three values: • UUID (String) e.g. “B9407F30-F5F8-466E-AFF9-25556B57FE6D”. • major number (unsigned short integer), i.e., an integer ranging from 1 to 65535. • minor number (unsigned short integer) like the major number. There are several combinations of these parameters that we can specify in the region: UUID + major + minor, UUID + major, UUID alone, or none of it.
  • 17. Important concepts for developers (cond’t) Beacon monitoring We can think of beacon monitoring as “geofence”, or in other words, as a virtual barrier (usually defined using geographic coordinates). Moving in and out of this area, “enter” and “exit” events are generated and apps can react to them (events usually take up only 30 seconds to trigger).
  • 18. Important concepts for developers (cond’t) Beacons ranging While monitoring creates a virtual fence to detect when you are moving in and out, ranging actively scans for any nearby beacons and delivers results to us every second then we can get a full list of matching beacons currently in range (complete with their UUID, major, and minor values).
  • 19. Important concepts for developers (cond’t) Proximity estimation The receiver can estimate the distance by analyzing the power of the Bluetooth signal received. It can also categorize the beacons into four proximity zones: • immediate (strong signal ! a few centimeters) • near (medium signal ! up to a few meters) • far (weak signal ! more than a few meters) • unknown (very weak signal ! “hard to say”) There is also another, more distinct feature of ranging:
  • 20. Demonstration: simple restaurant Android app I have made a simple Android application to show the use of Estimote beacons. • Name: Notification Restaurant Beacon • Purpose: notify the daily menu of a restaurant • Topic: beacon monitoring • Cloud: None (for simplicity) • Used technologies: Estimote SDK for Android • Tested on: Nexus 5 with Android 6.0.1 • GitHub repository: https://github.com/davidepic91/ NotificationRestaurantBeacon.git
  • 21. Simple restaurant Android app (cond’t) 1. Open your own QR code reader or download and install "QR Code Reader" from Play Store. In the second case, go to setting and disable " Use the in- app browser“ 2. Read the QR code 3. Open URL 4. Click on the button in the upper right 5. Click on "direct download" and confirm with "ok“ 6. Go to phone settings and enable the installation of apps from unknown sources 7. Open .apk file from "Download" and install it. 8. Open the application In order to try the app, you can follow these steps:
  • 22. Simple restaurant Android app (cond’t) @Override
 public void onCreate() {
 super.onCreate();
 
 //ADD A BEACON MANAGER
 beaconManager = new BeaconManager(getApplicationContext());
 
 //START MONITORING
 beaconManager.setMonitoringListener(new BeaconManager.MonitoringListener() {
 @Override
 public void onEnteredRegion(Region region, List<Beacon> list) {
 showNotification("Restaurant AL VIALETTO", "Click for the dishes of the day");
 }
 @Override
 public void onExitedRegion(Region region) {
 }
 });
 beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
 @Override
 public void onServiceReady() {
 beaconManager.startMonitoring(new Region("monitored region",
 UUID.fromString("B9407F30-F5F8-466E-AFF9-25556B57FE6D"), 17957, 56571));
 }
 });
 } Code from MyApplication.java
  • 23. Simple restaurant Android app (cond’t)
  • 24. Simple restaurant Android app (cond’t)