droid con 2015 - experimenting monitoring and proximity techniques using android potential and...

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

Upload: commit-software

Post on 20-Aug-2015

101 views

Category:

Engineering


7 download

TRANSCRIPT

Page 1: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

+MatteoGazzurelli

Experimenting Monitoring and Proximity techniques using Android potentialand iBeacon devices

1

April, 9 2015

Page 3: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

•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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Proximity MarketingContent Delivery

Gamification

Treasure Hunt

Indoor Location WayFinding

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

Page 6: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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

RangingGives 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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Enteringin region

UUID - Minor - Major - Range

Content

BeaconApp

Pushing Contentto Users

Server

Page 8: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

1) Download the library2) Let your activity implements BeaconConsumer3) 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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Alt Beacon Library

4) Implement AltBeacon Methods@Overridepublic 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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

iBeacon Devices

Page 14: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

CONS:Closed SourceWork only with EstimoteTake time to fix distances

iBeacon Android Libraries

PROOptimised for

EstimoteCan program

EstimoteEasy to use

CONS:Cannot program iBeaconsGeneral libraryLess accurate distances

PROWorks with all major

iBeacons Open Source

Good starting point

Page 15: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

• Tried both libraries

• Monitoring (only

Estimote)

• Ranging

• WayFinding

• Indoor Location (our

way)

Our Experiment

Page 16: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Monitoring

/ Ranging

iBeaconsDEMO

Click for the video

Page 17: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

WayFindin

gDEMO

Click for the video

Page 18: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Indoor Locatio

nDEMO

Click for the video

Page 20: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

• Estimote (Win)• Using iBeacons is very easy• Indoor Location is not so easy• iBeacon drains your Battery!• iBeacon technology is not mature

ExperimentResults

Page 21: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Apps based on iBeacon

Why you don’t make

it for Android???

Page 24: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

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: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices

Download the demo

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

6)