Gigigo Keynote - Geofences & iBeacons

21
Geofences & iBeacons Alejandro Rupérez Programmer Analyst (Research & Development) [email protected]

description

Geofences & iBeacons Keynote at Gigigo by Alejandro Rupérez - Programmer Analyst - Research & Development

Transcript of Gigigo Keynote - Geofences & iBeacons

Page 1: Gigigo Keynote - Geofences & iBeacons

Geofences & iBeacons

Alejandro RupérezProgrammer Analyst

(Research & Development)[email protected]

Page 2: Gigigo Keynote - Geofences & iBeacons

Geofence

• A geofence is a virtual perimeter or barrier for real-world geographic areas.

• A geofence could be dynamically generated as in a radius around a point location.

Page 3: Gigigo Keynote - Geofences & iBeacons

Geofence

• When the location-aware device of a location-based service (LBS) user enters or exits a geofence, the device receives a generated notification.

Page 4: Gigigo Keynote - Geofences & iBeacons

iBeacon

• "A new class of low-powered, low-cost transmitters that can notify nearby iOS 7 devices of their presence." - Apple Inc.

Page 5: Gigigo Keynote - Geofences & iBeacons

iBeacon

• Works on Low Energy Bluetooth (BLE), also known as Bluetooth 4.0 or Bluetooth Smart.

• iBeacons has endless possibilities like indoor positioning systems or social media check-ins.

Page 6: Gigigo Keynote - Geofences & iBeacons

Example

Page 7: Gigigo Keynote - Geofences & iBeacons

Example

• When the user enters in the shopping center’s geofence, the application is set to hear the iBeacons with their ProximityUUID (Universally unique identifier).

Page 8: Gigigo Keynote - Geofences & iBeacons

Example

• We can detect and triangulate the user's position within the shopping center placing several iBeacons with the same identifier ProximityUUID and a major identifier for each store.

Page 9: Gigigo Keynote - Geofences & iBeacons

Example

• We can also detect and triangulate the user's position within the store placing several iBeacons with the same identifier ProximityUUID, the store’s major identifier and minor identifiers for each section.

Page 10: Gigigo Keynote - Geofences & iBeacons

Example

Page 11: Gigigo Keynote - Geofences & iBeacons

Example

• We can detect when the user approaches or moves away from a section for advertising or offers.

• We can generate a payment area where you can pay with the phone without having to put the phone close to a NFC device.

Page 12: Gigigo Keynote - Geofences & iBeacons

How to implement this on iOS devices?

Page 13: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• Add the CoreLocation.framework

• Implement the protocol CLLocationManagerDelegate.

• Create a CLLocationManager instance and set the delegate.

Page 14: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:CLLocationCoordinate2DMake(40.44699, -3.58719) radius:150 identifier:@"Shopping Center Geofence"];

Page 15: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• [locationManager startMonitoringForRegion:region];

Page 16: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region

• - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region

Page 17: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• CLBeaconRegion *beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:@"01234567-89AB-CDEF-FEDC-BA9876543210"] identifier:@"Shopping Center iBeacons"];

Page 18: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• [locationManager startRangingBeaconsInRegion: beaconRegion];

Page 19: Gigigo Keynote - Geofences & iBeacons

iOS Implementation

• - (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region

• The beacons NSArray contains detected iBeacons in CLBeacon objects.

Page 20: Gigigo Keynote - Geofences & iBeacons

iOS Implementation• CLBeacon Class Reference:

• proximityUUID

• major

• minor

• proximity (The relative distance to the beacon: Immediate, Near, Far or Unknown.)

• accuracy (The accuracy of the proximity value, measured in meters from the beacon.)

• rssi (The received signal strength of the beacon, measured in decibels.)

Page 21: Gigigo Keynote - Geofences & iBeacons

Thanks!