droid con 2015 - experimenting monitoring and proximity techniques using android potential and...
TRANSCRIPT
![Page 1: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/1.jpg)
+MatteoGazzurelli
Experimenting Monitoring and Proximity techniques using Android potentialand iBeacon devices
1
April, 9 2015
![Page 2: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/2.jpg)
CEO / Android DeveloperDUCKMA Srl - [email protected]
![Page 3: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/3.jpg)
•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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/4.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/6.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/7.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/8.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/9.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/10.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/11.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/13.jpg)
iBeacon Devices
![Page 14: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/14.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/15.jpg)
• Tried both libraries
• Monitoring (only
Estimote)
• Ranging
• WayFinding
• Indoor Location (our
way)
Our Experiment
![Page 18: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/18.jpg)
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 20: Droid con 2015 - experimenting monitoring and proximity techniques using android potential and ibeacon devices](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/20.jpg)
• 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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/21.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/22.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/24.jpg)
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](https://reader035.vdocuments.site/reader035/viewer/2022062515/55d5e5babb61ebc0038b4577/html5/thumbnails/25.jpg)
Download the demo
Available on Google Play Store(Tested only on Nexus 5 and Nexus
6)