Intro to ibeacons
A Xamarin focused introduction to proximity detection with bluetooth low energy beacons
Rod Howarth
About Me
What are iBeacons
- Apple's trademark/spec for Bluetooth Low Energy 'beacons'
- Small battery powered devices that transmit a signal regularly
- iPhone, iPads detect and trigger events
- Proximity detection
- Estimate distance to beacon
What can you do with them?
- Increase context - detect your surroundings
- Notifications & events based on proximity
- Alert about deals
- Museum exhibits
- Home automation
- Open tickets / loyalty card
- Indoor navigation
- Virtual leash
- Inventory management
Must have app installed
In Use
Virgin Atlantic Heathrow - Passbook
Major League Baseball - Stadium Experiences
Geelong Cats Simonds Stadium
Apple Stores
Westpac trialing in branches
Museums (Rubens House)
Mt Ommaney Shopping Centre + 45 more coming in AUS
Types of iBeacons
Estimote
Stick'N'Find
Kontakt .io
Bluecats, Sonic Notify, Bluesense etc
Any iOS7 iPhone/iPad
Macbook Pro (using QuickBeacon)
Characteristics
Battery life (1-9 years)
Size
Temperature Sensors
Accelerometer
Power Level
Range (as far as ~70m)
SDK's
IDentifying Them
-
UUID
- Identifies owner
- 128-bit value
-
Major
- 16-bit unsigned int
- Used to group beacons with the same UUID
-
Minor
- 16-bit unsigned int
- Used to differentiate beacons within the same Major
Monitoring vs Ranging
Monitoring triggers when you come in range of a region
(region being UUID/Major/Minor)
Ranging can then be started to determine distances
Near, Far, Immediate
Can see distance in meters, but it's inaccurate (interference)
Ranging has higher battery use
Technical Details
Format specified by Apple
http://www.warski.org/blog/2014/01/how-ibeacons-work/
http://stackoverflow.com/questions/18906988/what-is-the-ibeacon-bluetooth-profile
Sample
Monitoring + Ranging in iOS
Tips
Environment is important
Calibrate power level in your environment
Ranging is for foreground only
Many beacons can have power level configured
(could remove the need for ranging)
Use multiple beacons to get a better fix on location
Responsiveness
Detecting region change can take up to 15 minutes!
1 second when ranging
NotifyEntryOnStateDisplay triggers on phone awakening
Great article:
Android
Not as well supported as iOS, but possible
Radius Networks component in Xamarin component store
Only for Android devices with Bluetooth LE
(Android 4.3 and up - 23%)
Samsung has a proprietary SDK for some older devices
Chews more battery life as its not built into OS
(hopefully announcements at Google IO?)
Android Component
Component here:
Example here:
Similar API to iOS
Links
Articles
Samples
https://github.com/RodH257/xamarinIosBeaconSample
http://blog.xamarin.com/play-find-the-monkey-with-ios-7-ibeacons/
https://github.com/xamarin/monotouch-samples/tree/master/AirLocate
http://www.knowing.net/index.php/2013/09/19/xamarin-code-for-ibeacons/