iBeacons talk for XCake, July 2015. (Clinch.io use case)

Post on 14-Aug-2015

211 views 0 download

transcript

iBeacons and Bluetooth LEfor fun and profit;;& a little frustration;;

Damien Glancy@dglancy

What are we looking at here?

Bluetooth LE is a specificationdifferent to regular Bluetooth

Specification is used to create chipsetssuch as Texas Instruments CC256x

Which are embedded into devicessuch as Estimote

iBeacon is based on the proximity part of the Bluetooth LE specification

What does it do?

Devices continuously transmit a small packet of data

Which wake up a listener to let it know they are there

Oh, Hi!

Oh, Hi!

Strength of signal allows listener to calculate the proximity of the device

GPS is about location

Beacons are about proximity

What data is sent?

Uses the “advertisement” channel of the Bluetooth LE spec

iBeacon prefix

Proximity UUIDMajor Code

TX power

Minor Code

9 bytes 16 bytes 2 bytes 2 bytes 1 byte

Total 31 bytes

fb0b57a2-8228-44-cd-913a-94a122ba1206 01 02

UUID

Major Number

Minor Number

Typical Data Packet Values

{ }That you need to worry about

These can be set to whatever you want

A typical naming scheme

Store Location Dublin Cork Limerick

UUIDD9B9EC1F-3925-43D0-80A9-

1E39D4CEA95C

Major 1 2 3

Minor

Clothing 10 10 10

Housewares 20 20 20

Garden 30 30 30

Core Location

- (void)startListenting { self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; [self.locationManager requestAlwaysAuthorization];}

Authorization

- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status { if (status == kCLAuthorizationStatusAuthorizedAlways) { //do something }}

CLLocationManagerDelegate

- (void)listenForBeacon:(CKBeacon *)beacon { CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:beacon.proximityUUID] major:beacon.major.unsignedShortValue minor:beacon.minor.unsignedShortValue identifier:beacon.name];

[self.locationManager startMonitoringForRegion:region];}

Start listening for a Beacon

- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region { CLBeaconRegion *beaconRegion = (CLBeaconRegion *)region;

NSString *proximityUUID = beaconRegion.proximityUUID; NSNumber *majorNumber = beaconRegion.major; NSNumber *minorNumber = beaconRegion.minor;}

CLLocationManagerDelegate

CLLocationManagerDelegate

didEnterRegion:

didExitRegion:

didRangeBeacons:inRegion:

Proximity

How does Clinch use

Beacons?

99%

Typic

al H

irin

g

Pro

cess

VIP

Pro

cess

Retail

Food & beverage sector

400+ locations

~5,000 open job positions

Successful candidates

Recruited from their customer base

Frequent the store/live nearby

Opt-in to job alerts

Measuring behaviour &

intersecting with skills &

employment history

Turning

the right

Customers

Into some

of your

best

Employees

Frustrations

or

Surprise, surprise. There are bugs!

Delayed Triggered Local Notifications

didExitRegion triggers

Don’t get me started on CLProximity