experimenting monitoring and proximity techniques using android potential and ibeacon devices -...

26
+MatteoGazzurelli Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices 1 April, 9 2015

Upload: duckma-srl

Post on 17-Jul-2015

729 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

+MatteoGazzurelli

Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices

1

April, 9 2015

Page 2: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

CEO / Android Developer DUCKMA Srl - Brescia @gazzumatteo duckma.com

Page 3: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

What iBeacon technology is and what is used for

How we can use this technology to effectively track people’s movements in a closed space like a room or a shop

How we can push interesting content on their smartphone based on their proximity to an object

My Experiment

Apps fully based on iBeacons

summary

Page 4: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

What is an iBeacon?from http://en.wikipedia.org/wiki/IBeacon

Enables a smartphone to perform actions when in close proximity to an iBeacon.

iBeacon uses Bluetooth low energy proximity sensing to transmit a universally unique identifier.

The identifier can be looked up to determine the device's physical location or trigger an action.

Page 5: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Proximity Marketing Content Delivery

Gamification Treasure Hunt

Indoor Location WayFinding

iBeacon Use Cases?from http://en.wikipedia.org/wiki/IBeacon

Page 6: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Monitoring Enables your app to know when the device enters and exits the range of beacons defined by the region

Ranging Gives you the exact list of beacons detected in a given region, together with an estimated distance from the device to each beacon.

iBeacon Monitoring and Ranging

Page 7: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Entering in region

UUID - Minor - Major - Range

Content

BeaconApp

Pushing Content to Users

Server

Page 8: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Field Size Description

UUID 16 bytesApplication developers should define a UUID specific to their app and deployment use case.

Major 2 bytes

Further specifies a specific iBeacon and use case. For example, this could define a sub-region within a larger region defined by the UUID.

Minor 2 bytesAllows further subdivision of region or use case, specified by the application developer.

UUID fb0b57a2-8228-44cd-913th-94a122ba1206 Minor 4563 Major 3457

iBeacon Advertisement

Page 9: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Indoor location: Locate an object or people inside a building.

Way-finding: Knowing where your desired location is, how to get there from your present location.

Way Finding / Indoor Locationfrom http://www.umich.edu/~wayfind/supplements/moreinfomain.htm

Page 10: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

1) Download the library 2) Let your activity implements BeaconConsumer 3) Create your iBeacon identifier and a Region

mAllBeaconsRegion = new Region(UNIQUE_ID, Identifier.parse(PROXIMITY_UUID), null, null);

beaconManager = BeaconManager.getInstanceForApplication(this); beaconManager.getBeaconParsers().add(new BeaconParser() .setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24")); beaconManager.bind(this);

Alt Beacon Libraryfollow https://altbeacon.github.io/android-beacon-library/configure.html

Page 11: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Alt Beacon Library4) Implement AltBeacon Methods@Override public void onBeaconServiceConnect() { beaconManager.setMonitorNotifier(new MonitorNotifier() { public void didEnterRegion(Region region) {} public void didExitRegion(Region region) {} public void didDetermineStateForRegion(int i, Region region) {}

5) Check if the device entered in a Beacon RegionbeaconManager.setRangeNotifier(new RangeNotifier() { @Override public void didRangeBeaconsInRegion(final Collection<Beacon> beacons, final Region region) { }

follow https://altbeacon.github.io/android-beacon-library/configure.html

Page 12: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

6) When entered in Region Send Notification

public void didRangeBeaconsInRegion(final Collection<Beacon> beacons, final Region region) { sendNotificationWear(beacon); }

7) Send Notification to Android Wear// Create a WearableExtender to add functionality for wearables // Build intent for notification content // Get an instance of the NotificationManager service // Build the notification and issues it with notification manager.

Wear Notificationfollow http://d.android.com/wear

Page 13: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

iBeacon Devices

Page 14: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

CONS: Closed Source Work only with Estimote Take time to fix distances

iBeacon Android Libraries

VsPRO

Optimised for Estimote Can program Estimote

Easy to use

CONS: Cannot program iBeacons General library Less accurate distances

PRO Works with all major iBeacons

Open Source Good starting point

Page 15: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Tried both libraries

Monitoring (only Estimote)

Ranging

WayFinding

Indoor Location (our way)

Our Experiment

Page 16: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Monitoring / Ranging iBeacons

DEMO

Page 17: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Way Finding

DEMO

Page 18: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Indoor location (the easy way)

No library for indoor location in Android

AltBeacon / Estimote SDK

No statistical assumptions

Empirical data (based on many iterations)

Approximation

How we made indoor location

Page 19: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Indoor Location

DEMO

Page 20: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Estimote (Win)

Using iBeacons is very easy

Indoor Location is not so easy

iBeacon drains your Battery!

iBeacon technology is not mature

Experiment Results

Page 21: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

FingerprintingTriangulation

Trilateration

Other external components such as Wi-fi, Magnetic field…

Signals theory (clean signal waves)

Statistical Algorithms (Best fit, Monte Carlo Localisation)

Internal sensors (accelerometer compass)

Indoor location (the correct - and hard - way)

Page 22: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Apps based on iBeacon

Why you don’t make it for Android???

Page 24: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

resources:Source Code Sample Experiment App:github.com/gazzumatteo/iBeaconExperiments

Bluetooth Le Guide: d.android.com/guide/topics/connectivity/bluetooth-le.html

AltBeacon SDKaltbeacon.github.io/android-beacon-library

Estimote SDKhttps://github.com/Estimote/Android-SDK

Page 25: Experimenting Monitoring and Proximity techniques using Android potential and iBeacon devices - Gazzurelli Matteo - DroidCon 2015 Italy

Download the demo

Available on Google Play Store (Tested only on Nexus 5 and Nexus 6)