Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
iBeacons for Everyone! 
From iOS to Android! 
James Montemagno! 
Developer Evangelist, Xamarin! 
@JamesMontemagno!
Who is this guy?! 
James Montemagno! 
Developer Evangelist, Xamarin! 
@JamesMontemagno ! 
! 
http://motzcod.es! 
MyStepCou...
What is an iBeacon? 
• Apple calls it: 
• “A new class of low-‐powered, low-‐cost 
transmitters that can notify iOS device...
What is it really? 
A Device 
• What you place around and will 
transmits data to your app. 
An API 
• What you use to det...
Devices
• Your iOS 7.0+ Device 
• iPhone 4S, iPad 3rd Gen+, iPad Mini, 
iPod Touch 5th Gen+ 
• Even your Mac!
• Not your Android device… yet. 
• Android L introduces this.
• Cute Little Devices You Buy 
• Estimotes 
• Nearables & Beacons 
• Radius Networks –RadBeacon 
• Roximity 
• Onyx Beacon...
How they work
Bluetooth 4.0 Low Energy! 
§ Used for all communication!
“Fun” Bluetooth Stats! 
Spec 
Classic Bluetooth 
Bluetooth LE 
Distance/Range 
100 m (330ft) 
50 m (160ft) 
(theoretical) ...
• GATT (﴾Generic Attribute Profile)﴿ 
• UUIDs! 
• Flow: 
Client 
• Ini*ate 
commands 
& 
requests 
• (Computer 
/ 
Phone) ...
iBeacons Transmit! 
• UUID – Universally Unique Identifier 
• Region: 
• Major Number 
• Minor Number
They do NOT! 
• Push Notifications to Receivers/Devices 
• Track Users
API
Region Monitoring 
Ranging
Region Monitoring! 
• Notified on entry/exit of 
region 
• Works if phone is locked 
• Works if app is in 
background
Ranging! 
• Search for all Beacons with specific properties 
• Works in foreground 
• Proximity Monitoring 
• Immediate – ...
Ranging in Action!
What can find iBeacons?! 
• Your iOS 7.0+ Device 
• iPhone 4S, iPad 3rd Gen+, iPad Mini, iPod Touch 5th Gen+ 
• Your Andro...
What can we 
do with them?
iBeacons Transmits! 
• UUID – Universally Unique Identifier 
• Region: 
• Major Number 
• Minor Number
Apple Store! 
http://appleinsider.com/articles/13/12/06/first-look-using-ibeacon-location-awareness-at-an-apple-store
An example!
So much more!! 
• Museums 
• Scavenger Hunts 
• Athletics 
• Restaurants 
• About a gazillion other things!
iOS Demo
Why C#? 
Why Xamarin?
Automatically test your app on! 
hundreds of mobile devices ! 
Create native iOS, Android, Mac and 
Windows apps in Visual...
Architecting ! 
Mobile Apps!
The Silo Approach! 
Build App ! 
Multiple Times!
The Write-Once-Run-Anywhere Approach! 
Lowest Common! 
Denominator!
Xamarin’s Unique Approach! 
Native With ! 
Code Sharing!
Windows APIs!
iOS APIs | 100% Coverage!
Android APIs | 100% Coverage!
iOS Demo
How iOS 7.1 Changed Everything! 
• Background Notifications! 
• Location Permissions (﴾opt-‐out)﴿
What’s new in iOS 8! 
• More Opt-‐In Features 
• Never 
• Always 
• When App is Open 
• Enhanced Home Screen 
• Indoor loc...
How iOS 8 Broke Everything! 
• Must Request Authorization 
1. RequestWhenInUseAuthorization(﴾)﴿; 
2. RequestAlwaysAuthoriz...
Android Development! 
Estimote SDK 
Radius Networks iBeacon Service
Android Demo
Resources! 
• Code: 
• https://github.com/jamesmontemagno/iBeaconsEverywhere 
• Xamarin.com 
• Estimote.com 
• Android Blu...
Get Started Today: xamarin.com/download!
Find Me:! 
@JamesMontemagno | @XamarinHQ! 
http://motzcod.es | http://blog.xamarin.com! 
Q & A! 
! 
Get your free C# t-shi...
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
Upcoming SlideShare
Loading in …5
×

iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014

1,644 views

Published on

iBeacons are taking the world by storm allowing developers to leverage Bluetooth Low Energy to give their apps location support that can work just about anywhere including indoors. This give you the ability to enable any number of scenarios based upon device proximity that were never before possible. From retail stores to even sports including the Super Bowl and MLB, you will soon be finding iBeacons just about everywhere. Introduced as a core feature of iOS 7 iBeacon support has now found it's way to Android. You will learn what an iBeacon is, how they work, how you would want to use them, and how to get started making apps in both Android and iOS. All demonstrations will be coded in C#, but will be applicable to any iOS or Android developer in any language.

Published in: Software
  • Be the first to comment

  • Be the first to like this

iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014

  1. 1. iBeacons for Everyone! From iOS to Android! James Montemagno! Developer Evangelist, Xamarin! @JamesMontemagno!
  2. 2. Who is this guy?! James Montemagno! Developer Evangelist, Xamarin! @JamesMontemagno ! ! http://motzcod.es! MyStepCounterApp.com!
  3. 3. What is an iBeacon? • Apple calls it: • “A new class of low-‐powered, low-‐cost transmitters that can notify iOS devices of their presence.” • What does this mean? • Devices that can notify apps of exact device proximity and location awareness that was never before possible.
  4. 4. What is it really? A Device • What you place around and will transmits data to your app. An API • What you use to detect the devices in your apps.
  5. 5. Devices
  6. 6. • Your iOS 7.0+ Device • iPhone 4S, iPad 3rd Gen+, iPad Mini, iPod Touch 5th Gen+ • Even your Mac!
  7. 7. • Not your Android device… yet. • Android L introduces this.
  8. 8. • Cute Little Devices You Buy • Estimotes • Nearables & Beacons • Radius Networks –RadBeacon • Roximity • Onyx Beacon • ….About 100 other ones
  9. 9. How they work
  10. 10. Bluetooth 4.0 Low Energy! § Used for all communication!
  11. 11. “Fun” Bluetooth Stats! Spec Classic Bluetooth Bluetooth LE Distance/Range 100 m (330ft) 50 m (160ft) (theoretical) OTA Data 1-3 Mbit/s 1 Mbit/s Application throughput .7-2.1 Mbit/s .27 Mbit/s Security 56/128-bit 128-bit AES Peak current <30 mA <15 mA Consumption Power Consumption 1 mW .01 – .5 mW Latency 100ms 6ms Voice YES NO
  12. 12. • GATT (﴾Generic Attribute Profile)﴿ • UUIDs! • Flow: Client • Ini*ate commands & requests • (Computer / Phone) Server • Receives GATT commands • (Temperature Sensor / iBeacon) -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐Attributes -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ Characteris*cs • Data value transferred • BaDery Voltage Service • Collec*on of related Characteris*cs (perform a specific func*on) • Temperature measurements & *me intervals Descriptor • Provides addi*onal informa*on about characteris*c • Units (F vs C) • Op*onal How BLE Works!
  13. 13. iBeacons Transmit! • UUID – Universally Unique Identifier • Region: • Major Number • Minor Number
  14. 14. They do NOT! • Push Notifications to Receivers/Devices • Track Users
  15. 15. API
  16. 16. Region Monitoring Ranging
  17. 17. Region Monitoring! • Notified on entry/exit of region • Works if phone is locked • Works if app is in background
  18. 18. Ranging! • Search for all Beacons with specific properties • Works in foreground • Proximity Monitoring • Immediate – Centimeters/Held up to beacon • Near – 1 to 3 meters • Far – In detection range • Unknown – Proximity can not be determined or ranging has just begun.
  19. 19. Ranging in Action!
  20. 20. What can find iBeacons?! • Your iOS 7.0+ Device • iPhone 4S, iPad 3rd Gen+, iPad Mini, iPod Touch 5th Gen+ • Your Android Device • Android 4.3+ (﴾JellyBean)﴿ Devices • With BLE! • Nothing on Windows Phone or Windows 8 yet L
  21. 21. What can we do with them?
  22. 22. iBeacons Transmits! • UUID – Universally Unique Identifier • Region: • Major Number • Minor Number
  23. 23. Apple Store! http://appleinsider.com/articles/13/12/06/first-look-using-ibeacon-location-awareness-at-an-apple-store
  24. 24. An example!
  25. 25. So much more!! • Museums • Scavenger Hunts • Athletics • Restaurants • About a gazillion other things!
  26. 26. iOS Demo
  27. 27. Why C#? Why Xamarin?
  28. 28. Automatically test your app on! hundreds of mobile devices ! Create native iOS, Android, Mac and Windows apps in Visual Studio and C#
  29. 29. Architecting ! Mobile Apps!
  30. 30. The Silo Approach! Build App ! Multiple Times!
  31. 31. The Write-Once-Run-Anywhere Approach! Lowest Common! Denominator!
  32. 32. Xamarin’s Unique Approach! Native With ! Code Sharing!
  33. 33. Windows APIs!
  34. 34. iOS APIs | 100% Coverage!
  35. 35. Android APIs | 100% Coverage!
  36. 36. iOS Demo
  37. 37. How iOS 7.1 Changed Everything! • Background Notifications! • Location Permissions (﴾opt-‐out)﴿
  38. 38. What’s new in iOS 8! • More Opt-‐In Features • Never • Always • When App is Open • Enhanced Home Screen • Indoor location tracking
  39. 39. How iOS 8 Broke Everything! • Must Request Authorization 1. RequestWhenInUseAuthorization(﴾)﴿; 2. RequestAlwaysAuthorization(﴾)﴿; • Must add message to Info.plist
  40. 40. Android Development! Estimote SDK Radius Networks iBeacon Service
  41. 41. Android Demo
  42. 42. Resources! • Code: • https://github.com/jamesmontemagno/iBeaconsEverywhere • Xamarin.com • Estimote.com • Android Bluetooth Docs: • http://developer.android.com/guide/topics/connectivity/bluetooth-‐le.html • iOS Beacons Docs: • https://developer.apple.com/ibeacon/Getting-‐Started-‐with-‐iBeacon.pdf
  43. 43. Get Started Today: xamarin.com/download!
  44. 44. Find Me:! @JamesMontemagno | @XamarinHQ! http://motzcod.es | http://blog.xamarin.com! Q & A! ! Get your free C# t-shirt:! xamarin.com/shirt!

×