Download - (Enemy of the) State of Mobile Location Tracking

Transcript
Page 1: (Enemy of the) State of Mobile Location Tracking

R I C H A R D K E E N

(Enemy of the) State of Mobile Location Tracking

Page 2: (Enemy of the) State of Mobile Location Tracking
Page 3: (Enemy of the) State of Mobile Location Tracking

20,000 points over 232 days 15,000 miles travelled at an average of 2.6 mph

Page 4: (Enemy of the) State of Mobile Location Tracking
Page 5: (Enemy of the) State of Mobile Location Tracking

M E T H O D S O F L O C AT I O N T R A C K I N G

• On-device sensors (GPS etc.)

• Network provider tracking

• Indoor Wi-Fi scanning

• “Smart” rubbish bins…

Page 6: (Enemy of the) State of Mobile Location Tracking
Page 7: (Enemy of the) State of Mobile Location Tracking

W H Y T R A C K D E V I C E L O C AT I O N

• Safety & security

• Logistics

• Friend finders

• Fitness

• Journaling/quantified self

• Anticipatory computing

Page 8: (Enemy of the) State of Mobile Location Tracking

H O W I S A L O C AT I O N D E T E R M I N E D

Sensor Accuracy SpeedPower

consumptionCaveats

GPS ~40mSlow

(3 seconds+)High

Rarely works indoors

WiFi triangulation ~70m Fast MediumRarely works in

rural areas

Cell triangulation Cell ID 200m-1km Fast Low

Page 9: (Enemy of the) State of Mobile Location Tracking

R E Q U E S T I N G A S I N G L E L O C AT I O N

• Even single location updates come as an asynchronous stream – not a single final value

• Initial location is often cached and stale

• The user may be moving around as you request their location!

Page 10: (Enemy of the) State of Mobile Location Tracking

A N AT O M Y O F A L O C AT I O N

• latitude

• longitude

• altitude

• accuracy (horizontal and vertical)

• speed

• bearing

• timestamp

Page 11: (Enemy of the) State of Mobile Location Tracking
Page 12: (Enemy of the) State of Mobile Location Tracking

T R A C K I N G C H A L L E N G E S

• Power consumption

• Multitasking/background processing support

• Privacy settings (global & per-app)

• Device reboots

• Airplane mode, Wi-Fi disabled, cellular disabled

• Testing

Page 13: (Enemy of the) State of Mobile Location Tracking

S TA N D A R D L O C AT I O N S E R V I C E S

• Delivers a constant stream of locations over time

• Supports background multitasking (limited on Windows Phone)

• Power hungry with default settings

• Tracking won’t survive device reboots*

• Consider power impact of your callback code as well

Page 14: (Enemy of the) State of Mobile Location Tracking

S TA N D A R D L O C AT I O N S E R V I C E S - I M P R O V I N G P O W E R C O N S U M P T I O N

• On iOS & Windows Phone, manage power usage through location manager settings:

• desired accuracy level

• distance or time threshold between notifications – helps to reduce processing overhead

• iPhone 5+ & Google Nexus 5 support deferred updates & sensor batching

Page 15: (Enemy of the) State of Mobile Location Tracking

S TA N D A R D L O C AT I O N S E R V I C E S - I M P R O V I N G P O W E R C O N S U M P T I O N

iOS desiredAccuracy Power usage Highest power sensor

kCLLocationAccuracyBestForNavigation High GPS+

kCLLocationAccuracyBest High GPS

kCLLocationAccuracyNearestTenMeters High GPS

kCLLocationAccuracyHundredMetersMedium (urban)

High (rural)WiFi (urban) GPS (rural)

kCLLocationAccuracyKilometer Low Cell

kCLLocationAccuracyThreeKilometers Low Cell

Page 16: (Enemy of the) State of Mobile Location Tracking

Android priorities Accuracy Power usageHighest power sensor

used

PRIORITY_HIGH_ACCURACY Building-level High GPS

PRIORITY_BALANCED_POWER  _ACCURACY Block-level Medium WiFi

PRIORITY_LOW_POWER City-level Low Cell

PRIORITY_NO_POWER Varies None Varies

S TA N D A R D L O C AT I O N S E R V I C E S - I M P R O V I N G P O W E R C O N S U M P T I O N

Page 17: (Enemy of the) State of Mobile Location Tracking
Page 18: (Enemy of the) State of Mobile Location Tracking

S I G N I F I C A N T C H A N G E N O T I F I C AT I O N S

• Only available on iOS

• Low power overhead, relies on cell tower transitions

• On average notification triggered after a movement of around 500m and more than 5 minutes

• Survives reboots of the device

• Very useful in hybrid strategies

Page 19: (Enemy of the) State of Mobile Location Tracking
Page 20: (Enemy of the) State of Mobile Location Tracking
Page 21: (Enemy of the) State of Mobile Location Tracking

G E O F E N C E S

!

• Geofence is a region defined by a co-ordinate and radius (in this context)

• Can request background notification of entry or exit of the region (& dwelling on Android)

Page 22: (Enemy of the) State of Mobile Location Tracking

A

B

Page 23: (Enemy of the) State of Mobile Location Tracking
Page 24: (Enemy of the) State of Mobile Location Tracking

E X I T A

Page 25: (Enemy of the) State of Mobile Location Tracking

E N T E R B

Page 26: (Enemy of the) State of Mobile Location Tracking

G E O F E N C E L I M I TAT I O N S

• Often quite a lag, doesn’t always trigger

• Not available on Windows Phone

• iOS supports up to 20 per app, Android up to 100

• Survives reboots on iOS, not on Android

Page 27: (Enemy of the) State of Mobile Location Tracking

H Y B R I D S T R AT E G I E S

Your app will have unique tracking needs; the default strategies are rarely the most appropriate

!

Find the ideal balance of quality, power use, granularity and frequency for your app

Page 28: (Enemy of the) State of Mobile Location Tracking

A N A S I D E : A P P L E M 7 & S I M I L A R

• iPhone 5S shipped with Apple M7 “motion co-processor”

• Does not relate to location data

• Google Nexus 5 and Moto X ship with “hardware sensor batching” – equivalent functionality

• Currently provides step counting & activity detection

Page 29: (Enemy of the) State of Mobile Location Tracking

T O O L S

• Profiling tools allow you to monitor use of GPS over time

• For iOS use Instruments, untethered capture supported via iPhone settings

• For Android use Qualcomm Trepn plugin for Eclipse

Page 30: (Enemy of the) State of Mobile Location Tracking
Page 31: (Enemy of the) State of Mobile Location Tracking
Page 32: (Enemy of the) State of Mobile Location Tracking

B L U E T O O T H B E A C O N S

• “iBeacon” – Apple specification for Bluetooth 4 location beacons

• Indoor high-accuracy location triggers

• Indoor positioning

• Opt-in via install of app tied to iBeacon namespace

Page 33: (Enemy of the) State of Mobile Location Tracking

T H A N K S !

@richardkeen

[email protected]

iOS reference: http://bit.ly/19O9PZS

Android reference: http://bit.ly/18mMnSX

Windows Phone reference: http://bit.ly/1aJu6y8