SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 
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
 

Ähnlich wie 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...
 
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
 
Wlan design for high density environments clark vitek
Wlan design for high density environments clark vitekWlan design for high density environments clark vitek
Wlan design for high density environments clark vitek
 

Mehr von 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
 

Mehr von 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...
 

Kürzlich hochgeladen

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Kürzlich hochgeladen (20)

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

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