developing context aware applications with ibeacons technology
DESCRIPTION
Having mobile applications that is context aware leads to interesting use cases. Imagine you are walking through a shopping mall and your mobile application shows near by shops where you are located, with information like products available, offers available etc as you walk by it. In this session, we will see a brief history of iBeacons, what it is and how it can be useful for building context aware applications. Also we will see how we can create an Android application using C# that is context aware.TRANSCRIPT
![Page 1: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/1.jpg)
www.unicomlearning.com
Emerging Technology Emerging Technology Summit 2014Summit 2014
www.cloudandmobility.org
26 Sept, 2014 - Bangalore26 Sept, 2014 - Bangalore
Developing Context Aware Applications using iBeacon Developing Context Aware Applications using iBeacon technologytechnology
Suresh BallaSuresh Balla
Principal ConsultantPrincipal Consultant
Neudesic, IndiaNeudesic, India
![Page 2: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/2.jpg)
www.unicomlearning.comHeading
UNICOM PresentsUNICOM Presents
Emerging Technology Emerging Technology Summit-2014Summit-2014
Demo to set the stageWhat is an iBeacon technology?Why iBeacon technology?How to develop context aware mobile applications?Code Walkthrough Possibilities?
![Page 3: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/3.jpg)
Demo
UNICOM Conference Event Mobile App
![Page 4: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/4.jpg)
iBeacons
Proximity Technology – Enables Location Awareness Possibilities
![Page 5: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/5.jpg)
Related Technologies
GPS – Location TechnologyNFC – One to one proximity based
communication
![Page 6: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/6.jpg)
Bluetooth Low Energy (BLE)
• Bluetooth LE is a specification • The specification is used to create Bluetooth LE
chipsets e.g. Kontakt Chipset • The chipsets are embedded in devices e.g. Estimote
Device• Ultra low power consumption
• Streaming data• High data transfer data rates• Standard Bluetooth profile
Bluetooth Classic
![Page 7: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/7.jpg)
iBeacons Specification
Apple Specification and Trademark on using Bluetooth LE/Smart for indoor proximity
Implementing specification is free, subject to Apple NDA
![Page 8: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/8.jpg)
Devices with iBeacon Technology
• Called as Beacons• Obtain License from Apple– Technical specifications– iBeacon Logo– iBeacon Identity Guidelines
![Page 9: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/9.jpg)
Different Beacons
![Page 10: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/10.jpg)
How do iBeacons work?
• iBeacon broadcasts signal using a UUID• UUID is unique to a group of iBeacons, not an individual• Major• Minor
![Page 11: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/11.jpg)
Configurations for Retail ScenarioStore Location Bangalore Hyderabad Mumbai
UUID 2F234454-CF6D-4A0F-ADF2-F4911BA9FFA7
Major 1 2 3
Minor Clothing 10 10 10
Housewares 20 20 20
Automative 30 30 30
![Page 12: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/12.jpg)
iBeacons in Use• Devices can find iBeacons nearby that match a particular
UUID• This is known as ranging of beacons• Once found, device can determine power level of signal from
the beacon• Which in turn can approximate the distance• Three enumerated ranges supported in the specification
– IMMEDIATE, NEAR, and FAR
![Page 13: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/13.jpg)
Beacons are not Smart!
• No network connectivity• No concept of devices that have discovered them• No storage or additional information beyond UUID, Major,
Minor
![Page 14: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/14.jpg)
Device Compatibility
• iPhone 4S / iPad 3 and upwards, running iOS 7+• Android 4.3 and upwards, running Linux Kernel 3.4+ (with
Bluetooth 4.0 BLE)• Macs with Bluetooth 4 hardware, running Mavericks• Hardware vendors: Radius, Redbear, Estimote, and others
![Page 15: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/15.jpg)
Developing Applications
![Page 16: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/16.jpg)
iOS
• Support for iBeacons in CoreLocation in iOS 7.x• Create new CLBeaconRegion using UUID• DidRangeBeacons event used to detect nearby beacons• Returns array of beacons
![Page 17: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/17.jpg)
iOS (Xamarin)private CLLocationManager locationManager;private NSUuid beaconUUID = new NSUuid (" 2F234454-CF6D-4A0F-ADF2-F4911BA9FFA7 ");private CLBeaconRegion beaconRegion;
public void StartListeningForBeacons (){
beaconRegion = new CLBeaconRegion (beaconUUID, "0");locationManager = new CLLocationManager ();locationManager.DidRangeBeacons += (object sender, CLRegionBeaconsRangedEventArgs args) => {// args.Beacons contains the array of found beacons};locationManager.StartRangingBeacons (beaconRegion);locationManager.StartUpdatingLocation ();
}
![Page 18: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/18.jpg)
Android
• Apple does not provide iBeacon SDK for Android• Radius Networks open sourced SDK• OnIBeaconServiceConnect and RangingBeaconsInRegion
![Page 19: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/19.jpg)
Android (Xamarin)private readonly IBeaconManager iBeaconManager;private readonly Region monitoringRegion;private readonly Region rangingRegion;private const string UUID = " 2F234454-CF6D-4A0F-ADF2-F4911BA9FFA7 ";
public MainActivity (){
iBeaconManager = IBeaconManager.GetInstanceForApplication (this);monitorNotifier = new MonitorNotifier ();rangeNotifier = new RangeNotifier ();monitoringRegion = new Region ("r2MonitoringUniqueId", UUID, null, null);rangingRegion = new Region ("r2RangingUniqueId", UUID, null, null);
}
![Page 20: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/20.jpg)
Code Walkthrough of UNICOM conference event application
![Page 21: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/21.jpg)
Running iBeacons in the Background• Background Detection in iOS– Made possible by iOS 7.1!– Invoke ranging for beacons from AppDelegate (not
ViewController)– Beacon ranging will persist background and even work
when device is locked/standby
![Page 22: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/22.jpg)
Background detection in Android
• Default as Radius SDK actually runs as a service• Developer chooses how to handle OnResume, OnPause
events, and invoking application/service on updates• Should consider own service to handle background
notifications
![Page 23: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/23.jpg)
Background Tips
• Keeping BLE enabled and ranging will have some effect on battery
• Consider adding sleep time if running in background• Don't make expensive calls (e.g. networking, computation) on
each ranging
![Page 24: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/24.jpg)
iBeacon Ranging Accuracy
Walls or line-of-sight obstructions will decrease observed power range, and lead to inaccurate results
![Page 25: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/25.jpg)
Possiblities• Retail with Analytics• Museums and exhibitions• Mass transit• Events• Parking• Home Automation• Theme Parks
![Page 26: Developing context aware applications with iBeacons technology](https://reader035.vdocuments.mx/reader035/viewer/2022062705/5564975ad8b42ab8278b4c06/html5/thumbnails/26.jpg)
www.unicomlearning.com
Emerging Technology Emerging Technology Summit-2014Summit-2014
Organized byOrganized byUNICOM Trainings & Seminars Pvt. Ltd. UNICOM Trainings & Seminars Pvt. Ltd.
[email protected]@unicomlearning.com
Suresh BallaSuresh [email protected]@Neudesic.com
www.cloudandmobility.org