SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
GEOLOCATION WITH MOBILE APPSAdam Paxton
Connect.tech Atlanta
September 21st, 2017
PRESENTATION NOTES
bit.ly/mobilegeotalk
OVERVIEW
➤ A little GPS background
➤ Our responsibilities as devs and product owners
➤ What’s available on iOS
➤ And Android
➤ Location considerations cross platform
HELLO
➤ Adam Paxton
➤ Freelance Mobile App Developer

polancomedia.com
➤ Location API

condesa.io



Twitter: @adampax

Github: adampax
GLOBAL POSITIONING SYSTEM
➤ Satellites!
➤ Run by US Govt
➤ ~ 3 meters accuracy
➤ Trouble with obstructions
➤ inside buildings
➤ In canyons, skyscrapers
➤ Water
➤ Phones contain actual GPS hardware
➤ Power intensive!
➤ Takes time to determine location
(not a gps satellite)
ASSISTED GPS
ASSISTED GPS
➤ Helps with 3 big problems of GPS…
➤ Power consumption
➤ Response time
➤ Accuracy in buildings, etc
➤ …by using other stuff available on the phone
➤ Wifi signals
➤ Cell towers
DEVELOPER RESPONSIBILITIES
➤ Privacy
➤ Accurate reasons for authorization
➤ Battery conservation
➤ Privacy!
AUTHORIZATION
➤ Both platforms require the user to
explicitly grant permissions for your app to
use location.
➤ Android
➤ ‘Coarse’ or ‘Fine’ permission in manifest
➤ Runtime permission
➤ iOS
➤ Runtime permission of either
➤ ‘While in Use’
➤ Always
➤ Description of why permission is needed
AUTHORIZATION CONT’D
➤ Must handle case when permission is
denied or later removed
➤ ‘Pre-permission’ a popular option
➤ Give users a heads-up message prior to
asking for permission
➤ Recommended to wait to ask until
service is needed
IOS GEOLOCATION
➤ Core Location Framework contains
➤ Standard location service
➤ Significant-change location service
➤ Region monitoring
➤ Visits
developer.apple.com/documentation/corelocation
STANDARD LOCATION SERVICE
➤ Examples:
➤ Turn by turn navigation
➤ Get weather for current location
➤ Pros: Highest accuracy, Most configuration options
➤ Cons: Drains the battery
➤ Two Approaches:
➤ Onetime location request: requestLocation()
➤ Continually track location: startUpdatingLocation()
STANDARD LOCATION SERVICE CONT’D
➤ Return Data:
➤ Coordinates - Latitude/Longitude
➤ Accuracy in meters
➤ Altitude accuracy in meters
➤ Config options:
➤ Distance filter - min distance you move before generating another event
➤ Desired accuracy
➤ Activity type - power saving option to help device know when you’ve stopped
➤ Pause location automatically - power saving option
SIGNIFICANT-CHANGE LOCATION SERVICE
➤ Very low precision location tracking service
➤ Pros:
➤ Highly efficient battery usage
➤ Persists through device restart
➤ Cons: Very coarse location tracking, think 500m - 1k
➤ Apple now considers this a niche-usage service
➤ ‘Always’ authorization
REGION MONITORING, AKA GEOFENCING
➤ Example: App notifies user of sales when arriving at store location
➤ Pros:
➤ Highly efficient battery usage
➤ Persists through device restart
➤ Only receives location updates when entering/existing relevant regions
➤ Cons:
➤ Max 20 regions supported at one time
➤ Not always firing location event?
➤ Define region with set of coordinates and a radius
➤ ‘Always’ authorization
AND BEACONS!
➤ Similar to Region Monitoring, with Bluetooth beacons
➤ Place beacons anywhere, identify by unique ids
➤ Can determine a rough distance or range between device and beacon
VISITS LOCATION SERVICE
➤ Examples:
➤ Journaling app listing places visited throughout the day
➤ Music app that prepares gym playlist when user arrives at gym
➤ Pros: Highest level of battery efficiency
➤ Cons:
➤ After the fact info, not for realtime or near realtime location decisions
➤ Up to iOS to determine what constitutes a ‘visit’
➤ Return Data:
➤ Coordinates
➤ Horizontal accuracy in meters
➤ Approximate arrival & departure time, if applicable
➤ ‘Always’ authorization
ANDROID GEOLOCATION
➤ Fused Location Provider
➤ As in ‘fuses’ together location data
from GPS, Wifi, etc.
➤ Fewer ‘services’ than iOS, but more
configuration options
➤ requestLocationUpdates()
➤ getLastLocation()
➤ Geofence Provider
➤ Running in an Android Service
developer.android.com/training/location/
➤ Start receiving device location updates, similar to iOS startUpdatingService()
➤ Configuration Options
➤ Interval - preferred rate of receiving updates
➤ May be affected by other apps requesting faster updates
➤ Or by no updates being available
➤ Fastest Interval - set an upper limit on what your app can handle
➤ Priority - Set preference between accuracy and power consumption
➤ Number of updates - Stop receiving locations after x updates
REQUEST LOCATION UPDATES
➤ Number of updates - Stop receiving locations after x updates
➤ Expiration duration - Like the number of updates, but stop after a period of time
➤ Max wait time
➤ Smallest Displacement - Minimum ‘distance’ between location updates
REQUEST LOCATION UPDATES CONT’D
➤ Get the devices last known location
➤ Usually the same as the current location
➤ No waiting, not async
➤ Might be empty!
GET LAST LOCATION
GEOFENCES
➤ Similar setup as iOS
➤ Limited to 100 per device
➤ Minimum radius accuracy
➤ 100-150 meters
➤ Or 20-50m with Wifi
➤ Dwell option to set a minimum loitering
time before an entrance alert is sent
ANDROID SERVICES AND BACKGROUND LOCATION
➤ Run an android service to periodically request location
➤ Can set regular intervals, or get ‘hot’ or ‘cold’ around specific areas
➤ Combine with boot event receiver to restart after device reboot
➤ Background location service
➤ Re-register geofences
CROSS PLATFORM CONSIDERATIONS
➤ Expect different behavior and abilities between platform
➤ Depending on your goals, implementation may be easier on either platform
➤ Teach product owners importance of privacy!
➤ Complement Android location with background services
➤ Consider combining multiple options on iOS, depending on goal
THANKS
bit.ly/mobilegeotalk

Contenu connexe

Similaire à Geolocation for Mobile Apps - Connect.tech Atlanta, 2017

Ugnius vaznys tesonet
Ugnius vaznys   tesonetUgnius vaznys   tesonet
Ugnius vaznys tesonetUgniusVaznys
 
Android Pro Tips - IO 13 reloaded Event
Android Pro Tips - IO 13 reloaded EventAndroid Pro Tips - IO 13 reloaded Event
Android Pro Tips - IO 13 reloaded EventRan Nachmany
 
Mobile performance testing
Mobile performance testingMobile performance testing
Mobile performance testinghunz
 
Aemp-14 use with rtk gps system
Aemp-14  use with rtk gps systemAemp-14  use with rtk gps system
Aemp-14 use with rtk gps systemLandviser LLC
 
Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...
Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...
Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...GoIT
 
Android Mobile Application Testing: Specific Functional, Performance, Device ...
Android Mobile Application Testing: Specific Functional, Performance, Device ...Android Mobile Application Testing: Specific Functional, Performance, Device ...
Android Mobile Application Testing: Specific Functional, Performance, Device ...SoftServe
 
Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020Imran Sayed
 
Why Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp FinlandWhy Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp FinlandImran Sayed
 
2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...
2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...
2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...Sean Barbeau
 
Putting Asset Management Tools on the web and mobile devices with Cartegraph ...
Putting Asset Management Tools on the web and mobile devices with Cartegraph ...Putting Asset Management Tools on the web and mobile devices with Cartegraph ...
Putting Asset Management Tools on the web and mobile devices with Cartegraph ...GeCo in the Rockies
 
Making awesome apps
Making awesome appsMaking awesome apps
Making awesome appsDroidConTLV
 
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...DroidConTLV
 
T-10 Presentation TiConf EU
T-10 Presentation TiConf EU T-10 Presentation TiConf EU
T-10 Presentation TiConf EU Ket Majmudar
 
Indoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeaconsIndoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeaconsSimon Guest
 
iPad pilot proficiency check: How to fly like a pro with your iPad
iPad pilot proficiency check: How to fly like a pro with your iPadiPad pilot proficiency check: How to fly like a pro with your iPad
iPad pilot proficiency check: How to fly like a pro with your iPadSporty's Pilot Shop
 
Drone Transforming Media
Drone Transforming Media Drone Transforming Media
Drone Transforming Media Abhinav Aditya
 
Optimizing Apps for Better Performance
Optimizing Apps for Better PerformanceOptimizing Apps for Better Performance
Optimizing Apps for Better PerformanceElif Boncuk
 
InMobi inDecode - All About Location on Mobile : Ian Anderson
InMobi inDecode -  All About Location on Mobile : Ian AndersonInMobi inDecode -  All About Location on Mobile : Ian Anderson
InMobi inDecode - All About Location on Mobile : Ian AndersonInMobi
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatialGeCo in the Rockies
 

Similaire à Geolocation for Mobile Apps - Connect.tech Atlanta, 2017 (20)

Ugnius vaznys tesonet
Ugnius vaznys   tesonetUgnius vaznys   tesonet
Ugnius vaznys tesonet
 
Android Pro Tips - IO 13 reloaded Event
Android Pro Tips - IO 13 reloaded EventAndroid Pro Tips - IO 13 reloaded Event
Android Pro Tips - IO 13 reloaded Event
 
Week 4
Week 4Week 4
Week 4
 
Mobile performance testing
Mobile performance testingMobile performance testing
Mobile performance testing
 
Aemp-14 use with rtk gps system
Aemp-14  use with rtk gps systemAemp-14  use with rtk gps system
Aemp-14 use with rtk gps system
 
Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...
Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...
Mobile Saturday. Тема 2. Особенности тестирования приложения на Android: Spec...
 
Android Mobile Application Testing: Specific Functional, Performance, Device ...
Android Mobile Application Testing: Specific Functional, Performance, Device ...Android Mobile Application Testing: Specific Functional, Performance, Device ...
Android Mobile Application Testing: Specific Functional, Performance, Device ...
 
Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020Why progressive apps for WordPress - WordSesh 2020
Why progressive apps for WordPress - WordSesh 2020
 
Why Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp FinlandWhy Progressive Web Apps For WordPress - WordCamp Finland
Why Progressive Web Apps For WordPress - WordCamp Finland
 
2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...
2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...
2012 National Academy of Inventors - GPS Auto-Sleep for Energy-Efficient Loca...
 
Putting Asset Management Tools on the web and mobile devices with Cartegraph ...
Putting Asset Management Tools on the web and mobile devices with Cartegraph ...Putting Asset Management Tools on the web and mobile devices with Cartegraph ...
Putting Asset Management Tools on the web and mobile devices with Cartegraph ...
 
Making awesome apps
Making awesome appsMaking awesome apps
Making awesome apps
 
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
Will it run or will it not run? Background processes in Android 6 - Anna Lifs...
 
T-10 Presentation TiConf EU
T-10 Presentation TiConf EU T-10 Presentation TiConf EU
T-10 Presentation TiConf EU
 
Indoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeaconsIndoor location in mobile applications using iBeacons
Indoor location in mobile applications using iBeacons
 
iPad pilot proficiency check: How to fly like a pro with your iPad
iPad pilot proficiency check: How to fly like a pro with your iPadiPad pilot proficiency check: How to fly like a pro with your iPad
iPad pilot proficiency check: How to fly like a pro with your iPad
 
Drone Transforming Media
Drone Transforming Media Drone Transforming Media
Drone Transforming Media
 
Optimizing Apps for Better Performance
Optimizing Apps for Better PerformanceOptimizing Apps for Better Performance
Optimizing Apps for Better Performance
 
InMobi inDecode - All About Location on Mobile : Ian Anderson
InMobi inDecode -  All About Location on Mobile : Ian AndersonInMobi inDecode -  All About Location on Mobile : Ian Anderson
InMobi inDecode - All About Location on Mobile : Ian Anderson
 
Batty consumerization of geospatial
Batty consumerization of geospatialBatty consumerization of geospatial
Batty consumerization of geospatial
 

Plus de Adam Paxton

Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecAdam Paxton
 
Get Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecGet Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecAdam Paxton
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...Adam Paxton
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerAdam Paxton
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Adam Paxton
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumAdam Paxton
 
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Adam Paxton
 

Plus de Adam Paxton (7)

Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
Get Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecGet Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI Spec
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build Server
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
 
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
 

Dernier

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Dernier (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Geolocation for Mobile Apps - Connect.tech Atlanta, 2017

  • 1. GEOLOCATION WITH MOBILE APPSAdam Paxton Connect.tech Atlanta September 21st, 2017
  • 3. OVERVIEW ➤ A little GPS background ➤ Our responsibilities as devs and product owners ➤ What’s available on iOS ➤ And Android ➤ Location considerations cross platform
  • 4. HELLO ➤ Adam Paxton ➤ Freelance Mobile App Developer
 polancomedia.com ➤ Location API
 condesa.io
 
 Twitter: @adampax
 Github: adampax
  • 5. GLOBAL POSITIONING SYSTEM ➤ Satellites! ➤ Run by US Govt ➤ ~ 3 meters accuracy ➤ Trouble with obstructions ➤ inside buildings ➤ In canyons, skyscrapers ➤ Water ➤ Phones contain actual GPS hardware ➤ Power intensive! ➤ Takes time to determine location (not a gps satellite)
  • 7. ASSISTED GPS ➤ Helps with 3 big problems of GPS… ➤ Power consumption ➤ Response time ➤ Accuracy in buildings, etc ➤ …by using other stuff available on the phone ➤ Wifi signals ➤ Cell towers
  • 8. DEVELOPER RESPONSIBILITIES ➤ Privacy ➤ Accurate reasons for authorization ➤ Battery conservation ➤ Privacy!
  • 9. AUTHORIZATION ➤ Both platforms require the user to explicitly grant permissions for your app to use location. ➤ Android ➤ ‘Coarse’ or ‘Fine’ permission in manifest ➤ Runtime permission ➤ iOS ➤ Runtime permission of either ➤ ‘While in Use’ ➤ Always ➤ Description of why permission is needed
  • 10. AUTHORIZATION CONT’D ➤ Must handle case when permission is denied or later removed ➤ ‘Pre-permission’ a popular option ➤ Give users a heads-up message prior to asking for permission ➤ Recommended to wait to ask until service is needed
  • 11. IOS GEOLOCATION ➤ Core Location Framework contains ➤ Standard location service ➤ Significant-change location service ➤ Region monitoring ➤ Visits developer.apple.com/documentation/corelocation
  • 12. STANDARD LOCATION SERVICE ➤ Examples: ➤ Turn by turn navigation ➤ Get weather for current location ➤ Pros: Highest accuracy, Most configuration options ➤ Cons: Drains the battery ➤ Two Approaches: ➤ Onetime location request: requestLocation() ➤ Continually track location: startUpdatingLocation()
  • 13. STANDARD LOCATION SERVICE CONT’D ➤ Return Data: ➤ Coordinates - Latitude/Longitude ➤ Accuracy in meters ➤ Altitude accuracy in meters ➤ Config options: ➤ Distance filter - min distance you move before generating another event ➤ Desired accuracy ➤ Activity type - power saving option to help device know when you’ve stopped ➤ Pause location automatically - power saving option
  • 14. SIGNIFICANT-CHANGE LOCATION SERVICE ➤ Very low precision location tracking service ➤ Pros: ➤ Highly efficient battery usage ➤ Persists through device restart ➤ Cons: Very coarse location tracking, think 500m - 1k ➤ Apple now considers this a niche-usage service ➤ ‘Always’ authorization
  • 15. REGION MONITORING, AKA GEOFENCING ➤ Example: App notifies user of sales when arriving at store location ➤ Pros: ➤ Highly efficient battery usage ➤ Persists through device restart ➤ Only receives location updates when entering/existing relevant regions ➤ Cons: ➤ Max 20 regions supported at one time ➤ Not always firing location event? ➤ Define region with set of coordinates and a radius ➤ ‘Always’ authorization
  • 16. AND BEACONS! ➤ Similar to Region Monitoring, with Bluetooth beacons ➤ Place beacons anywhere, identify by unique ids ➤ Can determine a rough distance or range between device and beacon
  • 17. VISITS LOCATION SERVICE ➤ Examples: ➤ Journaling app listing places visited throughout the day ➤ Music app that prepares gym playlist when user arrives at gym ➤ Pros: Highest level of battery efficiency ➤ Cons: ➤ After the fact info, not for realtime or near realtime location decisions ➤ Up to iOS to determine what constitutes a ‘visit’ ➤ Return Data: ➤ Coordinates ➤ Horizontal accuracy in meters ➤ Approximate arrival & departure time, if applicable ➤ ‘Always’ authorization
  • 18. ANDROID GEOLOCATION ➤ Fused Location Provider ➤ As in ‘fuses’ together location data from GPS, Wifi, etc. ➤ Fewer ‘services’ than iOS, but more configuration options ➤ requestLocationUpdates() ➤ getLastLocation() ➤ Geofence Provider ➤ Running in an Android Service developer.android.com/training/location/
  • 19. ➤ Start receiving device location updates, similar to iOS startUpdatingService() ➤ Configuration Options ➤ Interval - preferred rate of receiving updates ➤ May be affected by other apps requesting faster updates ➤ Or by no updates being available ➤ Fastest Interval - set an upper limit on what your app can handle ➤ Priority - Set preference between accuracy and power consumption ➤ Number of updates - Stop receiving locations after x updates REQUEST LOCATION UPDATES
  • 20. ➤ Number of updates - Stop receiving locations after x updates ➤ Expiration duration - Like the number of updates, but stop after a period of time ➤ Max wait time ➤ Smallest Displacement - Minimum ‘distance’ between location updates REQUEST LOCATION UPDATES CONT’D
  • 21. ➤ Get the devices last known location ➤ Usually the same as the current location ➤ No waiting, not async ➤ Might be empty! GET LAST LOCATION
  • 22. GEOFENCES ➤ Similar setup as iOS ➤ Limited to 100 per device ➤ Minimum radius accuracy ➤ 100-150 meters ➤ Or 20-50m with Wifi ➤ Dwell option to set a minimum loitering time before an entrance alert is sent
  • 23. ANDROID SERVICES AND BACKGROUND LOCATION ➤ Run an android service to periodically request location ➤ Can set regular intervals, or get ‘hot’ or ‘cold’ around specific areas ➤ Combine with boot event receiver to restart after device reboot ➤ Background location service ➤ Re-register geofences
  • 24. CROSS PLATFORM CONSIDERATIONS ➤ Expect different behavior and abilities between platform ➤ Depending on your goals, implementation may be easier on either platform ➤ Teach product owners importance of privacy! ➤ Complement Android location with background services ➤ Consider combining multiple options on iOS, depending on goal