Integrating i beacons into your project appsterdam lunchtime lecture 12 feb 2014

992 views

Published on

This presentation was given at the Appsterdam Lunchtime Lecture on 12th Feb 2014 by Jonathan Carter of GlimwormBeacons.

It explains some background about iBeacons and some practical tips about using them in your projects.

It also gives some product details of GlimwormBeacons which are Apple iBeacon compatible sensors manufactured in the Netherlands.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
992
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
55
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Integrating i beacons into your project appsterdam lunchtime lecture 12 feb 2014

  1. 1. integrating iBeacons into your project J Carter / Glimworm IT BV and.. Glimworm Beacons 12th Feb 2014 Appsterdam Lunchtime Lecture Friday, 14 February 14
  2. 2. Concepts •Monitoring •Ranging •Advertising Friday, 14 February 14
  3. 3. Monitoring Friday, 14 February 14
  4. 4. Monitoring Inside Inside Inside Inside Friday, 14 February 14 Inside Inside Inside
  5. 5. Monitoring Friday, 14 February 14
  6. 6. Friday, 14 February 14
  7. 7. #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> @interface glimbeaconViewController : UIViewController <CLLocationManagerDelegate> @end Friday, 14 February 14
  8. 8. @implementation glimbeaconViewController { NSMutableDictionary *_beacons; CLLocationManager *_locationManager; NSMutableArray *_rangedRegions; CLBeaconRegion *_region; } ... - (void)viewDidLoad { [super viewDidLoad]; _locationManager = [[CLLocationManager alloc] init]; _locationManager.delegate = self; } - (void) locationManager:(CLLocationManager *)manager didRangeBeacons: (NSArray *)beacons inRegion:(CLBeaconRegion *)region { if ([beacons count] > 0) { // Handle your found beacons here CLBeacon *beacon = [beacons objectAtIndex:0]; NSString *_cnt = [[NSString alloc] initWithFormat:@"Number of beacons is : %lu and the first one is %f away from you",(unsigned long) [beacons count],beacon.accuracy]; NSLog(_cnt); } else { NSLog(@"there are no beacons in range"); } } -(void)viewDidAppear:(BOOL)animated { NSUUID *proximityUUID = [[NSUUID alloc] initWithUUIDString:@"74278bdab644-4520-8f0c-720eaf059935"]; _region = [[CLBeaconRegion alloc] initWithProximityUUID:proximityUUID identifier:@"Glimworm iBeacon"]; [_locationManager startRangingBeaconsInRegion:_region]; } -(void) viewDidDisappear:(BOOL)animated { [_locationManager stopRangingBeaconsInRegion:_region]; } Friday, 14 February 14
  9. 9. -(void)viewDidAppear:(BOOL)animated { NSUUID *proximityUUID = [[NSUUID alloc] initWithUUIDString:@"74278bda-b644-4520-8f0c-720eaf059935"]; _region = [[CLBeaconRegion alloc] initWithProximityUUID:proximityUUID identifier:@"Glimworm iBeacon"]; [_locationManager startMonitoringForRegion:_region]; } - (void) locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region { [_locationManager requestStateForRegion:region]; } - (void) locationManager:(CLLocationManager *)manager didDetermineState: (CLRegionState)state forRegion:(CLRegion *)region { switch (state) { case CLRegionStateInside: /* it would be smart to start ranging beacons here */ break; case CLRegionStateOutside: case CLRegionStateUnknown: default: /* beacons will typically be on a low refresh */ /* so they will probably flip flop a bit when you are in range */ /* I would advise to stop ranging on a timer */ NSLog(@"Region unknown"); } } Friday, 14 February 14
  10. 10. Inside Inside Outside Inside Inside Friday, 14 February 14 Inside Inside Inside
  11. 11. Ranging Friday, 14 February 14
  12. 12. Hyper Local Content Friday, 14 February 14
  13. 13. Near Far low = 5m , default = 50m, high = 100m Friday, 14 February 14
  14. 14. Friday, 14 February 14
  15. 15. Friday, 14 February 14
  16. 16. From Monitoring { identifier : “......”, regionState : “inside” } From Ranging { beacons : [ { UUID : “0000-0000-0000-0000”, major : 1, minor : 1, accuracy : 20.4, proximity : ‘near’ },{ ...}] } Friday, 14 February 14
  17. 17. Topology Friday, 14 February 14
  18. 18. UUID : “A” major : 1 minor : 1 UUID : “A” major : 1 minor : 2 UUID : “A” major : 2 minor : 1 Friday, 14 February 14 UUID : “A” major : 1 minor : 3 UUID : “B” major : 1 UUID : “A” minor : 1 major : 2 minor : 2
  19. 19. UUID : “A” major : 1 minor : 1 UUID : “A” major : 1 minor : 2 UUID : “A” major : 2 minor : 1 Friday, 14 February 14 UUID : “A” major : 1 minor : 3 UUID : “B” major : 1 UUID : “A” minor : 1 major : 2 minor : 2
  20. 20. On a Glimworm Beacon you can set: UUID: “0000-0000-000-0000” major : 0 - 63335 minor : 0 - 65535 power : 5m / 50m / 100m Interval : 100ms, 1.2s , 2.4s Pincode : 000000 Friday, 14 February 14
  21. 21. Over the air configuration Friday, 14 February 14
  22. 22. USP Friday, 14 February 14
  23. 23. USP Friday, 14 February 14
  24. 24. Android Friday, 14 February 14
  25. 25. Radius Networks Friday, 14 February 14
  26. 26. Friday, 14 February 14
  27. 27. Friday, 14 February 14
  28. 28. Friday, 14 February 14
  29. 29. Friday, 14 February 14
  30. 30. Radius Networks Friday, 14 February 14
  31. 31. It’s the end of the world as we know it Friday, 14 February 14

×