Mobile devices may use GPS or cell tower positioning ¡ You can also use IP address lookups to get a rough location (but is usually very inaccurate) aaron.pk/slides
is left with an empty page waiting for them to press “allow” ¡ You should do the best you can with no location, and then update your page after you get the user’s location ¡ Could use IP-based location to center a map somewhere that is (probably) nearby aaron.pk/slides
Your app will be re-launched in the background when the user moves “significantly” • Most likely when they change cell towers • Location is usually very rough, ~500-1500m accuracy
aaron.pk/slides • Service runs in the background, gets locations when other providers or apps request location. • Not guaranteed to get any data, but it will use no additional resources. • Could be cell tower location, could be GPS
the operating system ¡ iOS delivers location events to a delegate object in the app when it’s running ¡ iOS may terminate your app due to high memory conditions, etc. ¡ If terminated, iOS will re-launch the app in the background when a location event is received ¡ Less control over when the data is received, but less code to manage aaron.pk/slides
runs persistently ¡ The app’s service requests location data from the OS ¡ The OS delivers location data to the service ¡ More control available on Android, but also requires more code to manage aaron.pk/slides