mobile development in age of internet of things and programming apple watch

24
MOBILE DEVELOPMENT IN THE AGE OF INTERNET OF THINGS Janusz Chudzynski Florida Northwest IT Pro Camp November 2014

Upload: janusz-chudzynski

Post on 14-Jul-2015

219 views

Category:

Mobile


1 download

TRANSCRIPT

Page 1: Mobile development in age of Internet of Things and programming Apple Watch

MOBILE DEVELOPMENT IN THE AGE OF INTERNET OF THINGS

Janusz ChudzynskiFlorida Northwest IT Pro Camp

November 2014

Page 2: Mobile development in age of Internet of Things and programming Apple Watch

ABOUT MeJanusz Chudzynski● Research Associate at University of West Florida● Coauthor of two eBooks related to iOS programming● Developer of mobile applications for iOS, Android and Blackberry● Taught multiple editions of iOS programming course at UWF

Page 3: Mobile development in age of Internet of Things and programming Apple Watch

Outline● Introduction● Mobile Development● Internet of Things● WatchKit Demo● iBeacons

Page 4: Mobile development in age of Internet of Things and programming Apple Watch

History

Page 5: Mobile development in age of Internet of Things and programming Apple Watch

Why mobile development?

● it pays well● it’s a future● it’s more interesting than building regular

applications

Page 6: Mobile development in age of Internet of Things and programming Apple Watch

Internet of ThingsInternet of things or IoT is a network of connected computing devices. Complexity of devices varies from simple sensors, to advanced computing devices with UI and high processing capabilities.

Page 7: Mobile development in age of Internet of Things and programming Apple Watch

Scale of IoT20141.4 billions mobile device 1.5 billion computers

20208 billions connected devices20 - 700 billion IoT devices!

Source: Rethinking the Internet of Things

Page 8: Mobile development in age of Internet of Things and programming Apple Watch

IoT Components

End User

Sensors Layer

Input/Output - Presentation Layer

Processing & Analytics Layer

Page 9: Mobile development in age of Internet of Things and programming Apple Watch

Platforms ComparisonPlatform OS Native Programming

Language

Apple iOS Objective-CSwift

Blackberry Blackberry OS Cascades Qt/C++WebWorks HTML5Native SDK C/C++Adobe AIR ActionScriptAndroid Runtime Java

Google Android Java

Microsoft Windows Phone C#

Samsung Tizen JavaScript, CSS, HTML5

Page 10: Mobile development in age of Internet of Things and programming Apple Watch

IoT Mobile Frameworks

Android iOS Windows

Android WearAndroid AutoAndroid TV

iOS 8● Handoff● Continuity● HealthKit● HomeKit

iBeaconWatchKit

Windows Developer Program for IoT.

Page 11: Mobile development in age of Internet of Things and programming Apple Watch

WatchKit● Framework designed to create apps for iWatch● Introduced two days ago● Currently requires presence of an iPhone to run

third-party apps. Fully native applications will be available next year.

● Watchkit Apps can be divided into three groups○ Apps - applications with full UI○ Notifications○ Glances - supplemental way for the user to view

important information from your app

Page 12: Mobile development in age of Internet of Things and programming Apple Watch

IOS TOOLS AND DEMO

Page 13: Mobile development in age of Internet of Things and programming Apple Watch

iBeaconiBeacon is a name of technology that is enabling new location awareness possibilities for estimation of proximity to a beacon [1] .

Leveraging Bluetooth Low Energy (BLE), a device with iBeacon technology can be used to establish a region around an object. This allows an iOS device to determine when it has entered or left the region, along with an estimated proximity.

Page 14: Mobile development in age of Internet of Things and programming Apple Watch

user-iBeacon-data

1

2 3

1. User enters the beacon’s region2. App recognizes it and starts

approximating it’s distance from/to the beacon

3. app identifies iBeacon, it’s proximity and displays data related to it

Page 15: Mobile development in age of Internet of Things and programming Apple Watch

iBeacon Use CasesRetailContextualized deals:based on time, location, clientMonitoring Shopping Behaviorstoring and analyzing data about customer’s behaviorIndoor Mapping

EducationContextual learning can be used in libraries, art museums, scavenger hunts, student orientation

HealthcareIdentifying location of patient, doctor.

Home AutomationDetecting user’s location

Social/DatingDetecting users with the same preferences nearby

HospitalityAutomated check in

Page 16: Mobile development in age of Internet of Things and programming Apple Watch

Proximity and rangeApple Identifies four different proximities defined as CLProximity enumeration type

enum CLProximity : Int { case Unknown case Immediate case Near case Far}Unknown - Location unknown, out of range

Immediate - immediate vicinity most likely right next to the beacon (few inches)

Near - relatively close to beacon (few meters)

Far - relatively close to beacon (more than 10 meters)

Standard beacons have an approximate range of 70 meters. Long range beacons can reach up to 450 meters.

Page 17: Mobile development in age of Internet of Things and programming Apple Watch

iBeacon AdvertisementEach iBeacon device transmits advertisement with the following fields, that help to identify location of the beacon:

Field Size Description

UUID 16 bytes Most generic, can be used for iBeacons used by app

Major 2 bytes Specifies iBeacon subregion

Minor 2 bytes Further subdivision

Store Location

Pensacola Chicago

UUID D9B9EC1F-3925-43D0-80A9-1E39D4CEA95C

Major 1 2

Minor- Patients

1 - 100000 1-100000

Minor Equipment

100000-200000 100000-200000

Page 18: Mobile development in age of Internet of Things and programming Apple Watch

Little Bit of Programming//Register regions and start monitoring for themCLBeaconRegion *beaconRegion = [[CLBeaconRegion alloc]initWithProximityUUID:@"B9407F30-F5F8-466E-AFF9-25556B57FE6D" major:1 minor:2 identifier:@"beacon id"]; beaconRegion.notifyOnEntry=YES; beaconRegion.notifyOnExit=YES; beaconRegion.notifyEntryStateOnDisplay=YES; [self.locationManager startMonitoringForRegion:beaconRegion];

//Delegate Methods:- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region{}//get’s called when user entered the region- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region{ if([region isKindOfClass:[CLBeaconRegion class]]){[self.locationManager startRangingBeaconsInRegion:(CLBeaconRegion *) region];}}//gets called when the system determines proximity to the beacons -(void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region{}//get’s called when user left the region-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region{}

You can download my iBeacon manager from Github:

https://github.com/appzzman/OpenSource/

Page 19: Mobile development in age of Internet of Things and programming Apple Watch

Supported HardwareAny device capable of connecting with BLE is capable of interacting with the iBeaconsApple:● iPad Mini or later● iPhone 4s or later● iPod Touch 4th generation or later● iPad 3rd generation or later● Mac Book Air, Mac Book Pro, Mac Pro with BLE

Android● Google Nexus 4,5,7,10● Samsung Galaxy

iBeacon is in almost 200 Million devices around us

Page 20: Mobile development in age of Internet of Things and programming Apple Watch

Where to get the iBeacon Hardware ?

● Estimote● Gimbail● Kontakt.ioand...Apple! Each device with BLE can serve as a iBeacon

Page 21: Mobile development in age of Internet of Things and programming Apple Watch

Q&A

?

Page 22: Mobile development in age of Internet of Things and programming Apple Watch

CONTACT

Email: [email protected]: https://www.linkedin.com/in/chudzynskiTwitter: @appzzman

Page 23: Mobile development in age of Internet of Things and programming Apple Watch

Best Places to Learn● Stanford iOS Programming Course on iTunes

U● Resources at developer.apple.com● Coursera and other MOOCs● Tutorials from Ray Wenderlich● Android Development site http://developer.

android.com/

Page 24: Mobile development in age of Internet of Things and programming Apple Watch

References and resources1. https://developer.apple.com/ibeacon/Getting-Started-with-iBeacon.pdf2. http://en.wikipedia.org/wiki/Bluetooth_low_energy3. http://developer.apple.com4. http://www.cdc.gov/handhygiene/Guidelines.html5. http://www.healthit.gov/policy-researchers-implementers/safer/guide/sg0066. http://www.forbes.com/sites/anthonykosner/2013/12/15/the-internet-of-ithings-apples-

ibeacon-is-already-in-almost-200-million-iphones-and-ipads/7. http://www.slideshare.net/TheMarketingDistillery/iot-presentation8. http://postscapes.com/what-exactly-is-the-internet-of-things-infographic9. http://venturebeat.com/2014/06/11/the-6-challenges-of-building-an-ibeacon-app/

10. http://www.bizjournals.com/atlanta/blog/atlantech/2014/09/at-t-says-it-plans-to-serve-10-million-connected.html

11. http://postscapes.com/internet-of-things-resources/12. http://electronicdesign.com/embedded/understanding-protocols-behind-internet-things