Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Geolocation in Web and Mobile Apps - Esri Dev S...

Geolocation in Web and Mobile Apps - Esri Dev Summit 2012

Aaron Parecki

November 19, 2012
Tweet

More Decks by Aaron Parecki

Other Decks in Programming

Transcript

  1. Geolocation in Web and Mobile Apps Aaron Parecki CTO, Esri

    R&D Center, Portland Esri Dev Summit, Berlin November 2012 e: [email protected] w: aaronparecki.com tw: @aaronpk aaron.pk/slides
  2. Finding Nearby Businesses ¡  ArcGIS Geocoder ¡  Foursquare API ¡ 

    Twitter API ¡  Yelp API ¡  Factual API ¡  Google Places API ¡  And others aaron.pk/slides
  3. Browser Geolocation ¡  Desktop browsers use nearby wifi hotspots ¡ 

    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
  4. Browser Geolocation ¡  Usability problem with this approach: ¡  User

    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
  5. Monitoring Continuous Location on the iPhone aaron.pk/slides This will keep

    running in the background! (But now you will potentially drain the battery)
  6. Retrieving Approximate Location on the iPhone [locationManager startMonitoringSignificantLocationChanges]; 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
  7. Retrieving Approximate Location on Android locationManager.requestLocationUpdate( LocationManager.PASSIVE_PROVIDER, 0, 0, listener);

    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
  8. iOS Location Services ¡  App registers for location updates from

    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
  9. Android Location Services ¡  App creates a background service which

    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
  10. The next generation advertising is local, personalized, and opt-in Advanced:

    Location combined with history (weather alerts, etc) Personalized Recommendations
  11. Once an official walks 100 feet from his building, he

    can no longer access confidential records. Geofences define conditional access rights. Conditional Access
  12. ¡ Scavenger hunts ¡ Social, location-based games using real-life as the playing

    field New revenue models ¡ Unlock levels based on venue access ¡ Retail location sponsorships Gaming
  13. Hospitality and Customer Service ¡ Customer’s prescription refill is ready when

    they get there. ¡ CRM Integration: based on their purchase history, a favorite item is on sale.
  14. ¡ Energy management and notifications ¡ Enter the house, the lights turn

    on ¡ Leave, and the lights turn off Home Automation
  15. *Weather Alert* Cover your cars at the dealership! A hailstorm

    will begin in 1 hour. Hyperlocal Weather Alerts
  16. ¡  Inform tourists of interesting locations as they explore your

    city. ¡  Bring existing datasets like Wikipedia to life Tourism
  17. Public Alerts ¡  Notify citizens about events such as road

    closures or civic emergencies based on past locations. Photo credit: Flickr: Brian Legate
  18. ¡  Send messages to prospective home buyers when their search

    criteria matches a home nearby. Real Estate