droid con 2015 - experimenting monitoring and proximity techniques using android potential and...
TRANSCRIPT
+MatteoGazzurelli
Experimenting Monitoring and Proximity techniques using Android potentialand iBeacon devices
1
April, 9 2015
CEO / Android DeveloperDUCKMA Srl - [email protected]
•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
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.
Proximity MarketingContent Delivery
Gamification
Treasure Hunt
Indoor Location WayFinding
iBeacon Use Cases?from http://en.wikipedia.org/wiki/IBeacon
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
Enteringin region
UUID - Minor - Major - Range
Content
BeaconApp
Pushing Contentto Users
Server
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
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
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
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
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
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
• Tried both libraries
• Monitoring (only
Estimote)
• Ranging
• WayFinding
• Indoor Location (our
way)
Our Experiment
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
• Estimote (Win)• Using iBeacons is very easy• Indoor Location is not so easy• iBeacon drains your Battery!• iBeacon technology is not mature
ExperimentResults
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)
Apps based on iBeacon
Why you don’t make
it for Android???
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
Download the demo
Available on Google Play Store(Tested only on Nexus 5 and Nexus
6)