developing context aware applications with ibeacons technology

26
www.unicomlearning.com Emerging Technology Emerging Technology Summit 2014 Summit 2014 www.cloudandmobility.org 26 Sept, 2014 - Bangalore 26 Sept, 2014 - Bangalore Developing Context Aware Applications using iBeacon Developing Context Aware Applications using iBeacon technology technology Suresh Balla Suresh Balla Principal Consultant Principal Consultant Neudesic, India Neudesic, India

Upload: suresh-balla

Post on 26-May-2015

631 views

Category:

Presentations & Public Speaking


0 download

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

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

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

Demo

UNICOM Conference Event Mobile App

Page 4: Developing context aware applications with iBeacons technology

iBeacons

Proximity Technology – Enables Location Awareness Possibilities

Page 5: Developing context aware applications with iBeacons technology

Related Technologies

GPS – Location TechnologyNFC – One to one proximity based

communication

Page 6: Developing context aware applications with iBeacons technology

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

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

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

Different Beacons

Page 10: Developing context aware applications with iBeacons technology

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

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

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

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

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

Developing Applications

Page 16: Developing context aware applications with iBeacons technology

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

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

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

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

Code Walkthrough of UNICOM conference event application

Page 21: Developing context aware applications with iBeacons technology

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

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

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

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

Possiblities• Retail with Analytics• Museums and exhibitions• Mass transit• Events• Parking• Home Automation• Theme Parks

Page 26: Developing context aware applications with iBeacons technology

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