SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Geolocation in
  Web and Mobile Apps
   Aaron Parecki – Web Directions – May 2011
aaron@parecki.com – http://aaron.pk – @aaronpk

          Slides and code available at
            aaron.pk/unplugged11
Displaying a Map




@aaronpk                      aaron.pk/unplugged11
Displaying a Map - HTML




@aaronpk                   aaron.pk/unplugged11
Displaying a Map - iPhone




@aaronpk                    aaron.pk/unplugged11
Displaying a Map - Android




@aaronpk                   aaron.pk/unplugged11
Finding the User’s
               Location




@aaronpk                    aaron.pk/unplugged11
Browser Geolocation
   !   Desktop browsers use nearby wifi hotspots

   !   Mobile devices may use GPS or cell tower positioning

   !   You can also use IP lookups to get a rough location
       (but is usually very inaccurate)




@aaronpk                                                     aaron.pk/unplugged11
Browser
  Geolocation
   with Wifi



@aaronpk        aaron.pk/unplugged11
Browser Geolocation




@aaronpk                     aaron.pk/unplugged11
Browser Geolocation




@aaronpk                     aaron.pk/unplugged11
Finding the User’s Location
                 using Javascript




@aaronpk                           aaron.pk/unplugged11
Browser Geolocation




@aaronpk                     aaron.pk/unplugged11
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




@aaronpk                                                  aaron.pk/unplugged11
Using SimpleGeo
      Start with IP-based geolocation to quickly center the map.
      Update with browser-based geolocation after it’s available.




                       aaron.pk/unplugged11
@aaronpk                                                 aaron.pk/unplugged11
Finding Nearby Businesses
   ! SimpleGeo Places

   !   Foursquare API

   !   Twitter API

   !   Yelp API

   !   Google Places API

   !   Many others




@aaronpk                    aaron.pk/unplugged11
Place Search with Foursquare




            developer.foursquare.com
@aaronpk                               aaron.pk/unplugged11
Place Search with SimpleGeo




@aaronpk                          aaron.pk/unplugged11
Place Search with SimpleGeo




                  aaron.pk/unplugged11
@aaronpk                                 aaron.pk/unplugged11
Finding Information
            About a Location




@aaronpk                    aaron.pk/unplugged11
SimpleGeo Context




@aaronpk                       aaron.pk/unplugged11
SimpleGeo Context




@aaronpk                       aaron.pk/unplugged11
Monitoring Continuous
                 Location




@aaronpk                     aaron.pk/unplugged11
Monitoring Continuous
           Location in Javascript




               Now go run around outside!
               (But keep the browser open)

@aaronpk                                     aaron.pk/unplugged11
Keep the browser open? That’s kind of lame.




@aaronpk                                                 aaron.pk/unplugged11
Monitoring Continuous
           Location on the iPhone




             This will keep running in the background!
           (But now you will potentially drain the battery)

@aaronpk                                                 aaron.pk/unplugged11
Saving battery by

            Getting the User’s
           Approximate Location




@aaronpk                              aaron.pk/unplugged11
Retrieving Approximate
                Location on the iPhone
           [locationManager startMonitoringSignificantLocationChanges];



   •  Your app will be re-launched in the background
      when the user moves “significantly”

   •  Most likely when they change cell towers

   •  Location is very rough, ~500-1500m accuracy




@aaronpk                                                       aaron.pk/unplugged11
Retrieving Approximate
              Location on Android
           locationManager.requestLocationUpdate(
             LocationManager.PASSIVE_PROVIDER, 0, 0, listener);


   •  Service runs in the background, gets locations
      when other providers or apps request location.

   •  Could be cell tower location, could be GPS




@aaronpk                                                  aaron.pk/unplugged11
Location-Based Triggers




@aaronpk                   aaron.pk/unplugged11
Geonotes                   Try it! aaron.pk/geonote
Location-Based Reminders
@aaronpk                             aaron.pk/unplugged11
Trigger-Based
           Actions




           Create triggers
           based on where
           users are.
@aaronpk          aaron.pk/unplugged11
Send a message to all users
within a radius.
@aaronpk                  aaron.pk/unplugged11
Arrived




Notify X when you arrive at place Y

@aaronpk                       aaron.pk/unplugged11
Real-time location-based gaming
@aaronpk                     aaron.pk/unplugged11
mapattack.org




@aaronpk                   aaron.pk/unplugged11
Hybrid Web/Native App

                   Web Views




@aaronpk                       aaron.pk/unplugged11
Communicating Between the
           Web and Native Components




@aaronpk                         aaron.pk/unplugged11
Communicating Between the
           Web and Native Components




@aaronpk                         aaron.pk/unplugged11
Turning On/Off Your Lights

                    Geoloqi	
  API	
  
                                         Your	
  Home	
  
                                           Server	
  



                                              X10	
  
                   SMSified.com	
  

                                         Your	
  Home	
  
And sending an SMS when you leave work     Lights	
  

@aaronpk                                            aaron.pk/unplugged11
X10 Lamp
   Switch
   Linux Command Line X10 Client
   www.heyu.org


   $ heyu on A1




@aaronpk                           aaron.pk/unplugged11
@aaronpk   aaron.pk/unplugged11
Create a Layer in Geoloqi




                Docs: geoloqi.org/API/layer/create

@aaronpk                                             aaron.pk/unplugged11
Create a Trigger in Geoloqi




             Docs: geoloqi.org/API/trigger/create

@aaronpk                                            aaron.pk/unplugged11
Handling a Trigger from Geoloqi




           Docs: geoloqi.org/Trigger_Callback
@aaronpk                                        aaron.pk/unplugged11
Create an SMS Number




               smsified.com	
  	
  	
  or	
  	
  	
  tropo.com	
  

@aaronpk                                                            aaron.pk/unplugged11
Send an SMS




@aaronpk                 aaron.pk/unplugged11
Questions?

   Code: aaron.pk/unplugged11

   Geoloqi API: geoloqi.org/API

   SMS API: smsified.com

                 Aaron Parecki @aaronpk
@aaronpk                       aaron.pk/unplugged11

Contenu connexe

En vedette

Open Government and Geolocation Mindy Nichamin
Open Government and Geolocation Mindy NichaminOpen Government and Geolocation Mindy Nichamin
Open Government and Geolocation Mindy NichaminYTH
 
Location-based social apps for marketers
Location-based social apps for marketersLocation-based social apps for marketers
Location-based social apps for marketersalyssabc
 
Location Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live Video
Location Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live VideoLocation Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live Video
Location Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live VideoStarmark
 
Synack at AppSec California 2015 - Geolocation Vulnerabilities
Synack at AppSec California 2015 - Geolocation VulnerabilitiesSynack at AppSec California 2015 - Geolocation Vulnerabilities
Synack at AppSec California 2015 - Geolocation VulnerabilitiesSynack
 
The Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter Age
The Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter AgeThe Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter Age
The Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter Age3GDR
 
Google Developer Days Brazil 2009 - Keynote
Google Developer Days Brazil 2009 -  KeynoteGoogle Developer Days Brazil 2009 -  Keynote
Google Developer Days Brazil 2009 - KeynotePatrick Chanezon
 
Patient appointment app for your clinic or hospital
Patient appointment app for your clinic or hospitalPatient appointment app for your clinic or hospital
Patient appointment app for your clinic or hospitalwww.webprogr.com
 
Graduate Case Study - Cooper Green Hospital
Graduate Case Study - Cooper Green HospitalGraduate Case Study - Cooper Green Hospital
Graduate Case Study - Cooper Green Hospitalspd5027
 
Geoloqi iPhone App Tour
Geoloqi iPhone App TourGeoloqi iPhone App Tour
Geoloqi iPhone App TourAaron Parecki
 
eHealth 2008: 3G Doctor Connecting Care and eHealth Records
eHealth 2008: 3G Doctor Connecting Care and eHealth RecordseHealth 2008: 3G Doctor Connecting Care and eHealth Records
eHealth 2008: 3G Doctor Connecting Care and eHealth Records3GDR
 
Александр Доржиев, AlterGeo: LBS-сервис для навигации в большом городе
Александр Доржиев, AlterGeo: LBS-сервис для навигации в большом городеАлександр Доржиев, AlterGeo: LBS-сервис для навигации в большом городе
Александр Доржиев, AlterGeo: LBS-сервис для навигации в большом городеProcontent.Ru Magazine
 
HorizonWatching: How IBM Develops Views of the Potential Futures
HorizonWatching:  How IBM Develops Views of the Potential FuturesHorizonWatching:  How IBM Develops Views of the Potential Futures
HorizonWatching: How IBM Develops Views of the Potential FuturesBill Chamberlin
 
Геотаргетинг - это_Клондайк?
Геотаргетинг - это_Клондайк?Геотаргетинг - это_Клондайк?
Геотаргетинг - это_Клондайк?Yandex
 
LBS Введение
LBS ВведениеLBS Введение
LBS ВведениеGleb Kaplun
 

En vedette (20)

Geolocation, The Next Big Thing
Geolocation, The Next Big ThingGeolocation, The Next Big Thing
Geolocation, The Next Big Thing
 
Open Government and Geolocation Mindy Nichamin
Open Government and Geolocation Mindy NichaminOpen Government and Geolocation Mindy Nichamin
Open Government and Geolocation Mindy Nichamin
 
Geolocation and Business
Geolocation and BusinessGeolocation and Business
Geolocation and Business
 
Location-based social apps for marketers
Location-based social apps for marketersLocation-based social apps for marketers
Location-based social apps for marketers
 
Geosocial Networks 4 Business
Geosocial Networks 4 BusinessGeosocial Networks 4 Business
Geosocial Networks 4 Business
 
Location Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live Video
Location Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live VideoLocation Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live Video
Location Based Marketing: Geofence, Beacon, Smart Posters, FanWise & Live Video
 
Synack at AppSec California 2015 - Geolocation Vulnerabilities
Synack at AppSec California 2015 - Geolocation VulnerabilitiesSynack at AppSec California 2015 - Geolocation Vulnerabilities
Synack at AppSec California 2015 - Geolocation Vulnerabilities
 
Travelling Apps
Travelling AppsTravelling Apps
Travelling Apps
 
The Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter Age
The Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter AgeThe Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter Age
The Digital Doctor: Hope, Hype, and Harm at the Dawn of Medicine's Compueter Age
 
Google Developer Days Brazil 2009 - Keynote
Google Developer Days Brazil 2009 -  KeynoteGoogle Developer Days Brazil 2009 -  Keynote
Google Developer Days Brazil 2009 - Keynote
 
Patient appointment app for your clinic or hospital
Patient appointment app for your clinic or hospitalPatient appointment app for your clinic or hospital
Patient appointment app for your clinic or hospital
 
Graduate Case Study - Cooper Green Hospital
Graduate Case Study - Cooper Green HospitalGraduate Case Study - Cooper Green Hospital
Graduate Case Study - Cooper Green Hospital
 
Geoloqi iPhone App Tour
Geoloqi iPhone App TourGeoloqi iPhone App Tour
Geoloqi iPhone App Tour
 
Paperless hospital management
Paperless hospital managementPaperless hospital management
Paperless hospital management
 
eHealth 2008: 3G Doctor Connecting Care and eHealth Records
eHealth 2008: 3G Doctor Connecting Care and eHealth RecordseHealth 2008: 3G Doctor Connecting Care and eHealth Records
eHealth 2008: 3G Doctor Connecting Care and eHealth Records
 
GPS & Geo-Fencing
GPS & Geo-FencingGPS & Geo-Fencing
GPS & Geo-Fencing
 
Александр Доржиев, AlterGeo: LBS-сервис для навигации в большом городе
Александр Доржиев, AlterGeo: LBS-сервис для навигации в большом городеАлександр Доржиев, AlterGeo: LBS-сервис для навигации в большом городе
Александр Доржиев, AlterGeo: LBS-сервис для навигации в большом городе
 
HorizonWatching: How IBM Develops Views of the Potential Futures
HorizonWatching:  How IBM Develops Views of the Potential FuturesHorizonWatching:  How IBM Develops Views of the Potential Futures
HorizonWatching: How IBM Develops Views of the Potential Futures
 
Геотаргетинг - это_Клондайк?
Геотаргетинг - это_Клондайк?Геотаргетинг - это_Клондайк?
Геотаргетинг - это_Клондайк?
 
LBS Введение
LBS ВведениеLBS Введение
LBS Введение
 

Plus de Aaron Parecki

Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Aaron Parecki
 
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Aaron Parecki
 
Rule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitRule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitAaron Parecki
 
Intro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceIntro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceAaron Parecki
 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Aaron Parecki
 
Low Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandLow Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandAaron Parecki
 
Done Reports - Open Source Bridge
Done Reports - Open Source BridgeDone Reports - Open Source Bridge
Done Reports - Open Source BridgeAaron Parecki
 
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISEsri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISAaron Parecki
 
UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2Aaron Parecki
 
Low Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeLow Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeAaron Parecki
 
Personal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesPersonal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesAaron Parecki
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2Aaron Parecki
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2Aaron Parecki
 
OAuth 2 at Webvisions
OAuth 2 at WebvisionsOAuth 2 at Webvisions
OAuth 2 at WebvisionsAaron Parecki
 
Home Automation with SMS and GPS
Home Automation with SMS and GPSHome Automation with SMS and GPS
Home Automation with SMS and GPSAaron Parecki
 
The Current State of OAuth 2
The Current State of OAuth 2The Current State of OAuth 2
The Current State of OAuth 2Aaron Parecki
 
Ambient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAmbient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAaron Parecki
 
The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9Aaron Parecki
 

Plus de Aaron Parecki (20)

Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
Deep Dive into the ArcGIS Geotrigger Service - Esri DevSummit Dubai 2013
 
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
 
Rule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer ToolkitRule Your Geometry with the Terraformer Toolkit
Rule Your Geometry with the Terraformer Toolkit
 
Intro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger ServiceIntro to the ArcGIS Geotrigger Service
Intro to the ArcGIS Geotrigger Service
 
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013Low Friction Personal Data Collection - Quantified Self Global Conference 2013
Low Friction Personal Data Collection - Quantified Self Global Conference 2013
 
Low Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS PortlandLow Friction Personal Data Collection - QS Portland
Low Friction Personal Data Collection - QS Portland
 
Done Reports - Open Source Bridge
Done Reports - Open Source BridgeDone Reports - Open Source Bridge
Done Reports - Open Source Bridge
 
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGISEsri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
Esri DevSummit 2013 Speed Geeking: Intro to Esri Geotrigger Service for ArcGIS
 
UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2UC2013 Speed Geeking: Intro to OAuth2
UC2013 Speed Geeking: Intro to OAuth2
 
Low Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source BridgeLow Friction Personal Data Collection - Open Source Bridge
Low Friction Personal Data Collection - Open Source Bridge
 
The State of OAuth2
The State of OAuth2The State of OAuth2
The State of OAuth2
 
Personal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session NotesPersonal Data Collection Breakout Session Notes
Personal Data Collection Breakout Session Notes
 
An Introduction to OAuth 2
An Introduction to OAuth 2An Introduction to OAuth 2
An Introduction to OAuth 2
 
An Introduction to OAuth2
An Introduction to OAuth2An Introduction to OAuth2
An Introduction to OAuth2
 
OAuth 2 at Webvisions
OAuth 2 at WebvisionsOAuth 2 at Webvisions
OAuth 2 at Webvisions
 
Home Automation with SMS and GPS
Home Automation with SMS and GPSHome Automation with SMS and GPS
Home Automation with SMS and GPS
 
The Current State of OAuth 2
The Current State of OAuth 2The Current State of OAuth 2
The Current State of OAuth 2
 
Ambient Location Apps and Geoloqi
Ambient Location Apps and GeoloqiAmbient Location Apps and Geoloqi
Ambient Location Apps and Geoloqi
 
The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9The Vowel R - Ignite Portland 9
The Vowel R - Ignite Portland 9
 

Dernier

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Geolocation in Web and Native Mobile Apps

  • 1. Geolocation in Web and Mobile Apps Aaron Parecki – Web Directions – May 2011 aaron@parecki.com – http://aaron.pk – @aaronpk Slides and code available at aaron.pk/unplugged11
  • 2. Displaying a Map @aaronpk aaron.pk/unplugged11
  • 3. Displaying a Map - HTML @aaronpk aaron.pk/unplugged11
  • 4. Displaying a Map - iPhone @aaronpk aaron.pk/unplugged11
  • 5. Displaying a Map - Android @aaronpk aaron.pk/unplugged11
  • 6. Finding the User’s Location @aaronpk aaron.pk/unplugged11
  • 7. Browser Geolocation !   Desktop browsers use nearby wifi hotspots !   Mobile devices may use GPS or cell tower positioning !   You can also use IP lookups to get a rough location (but is usually very inaccurate) @aaronpk aaron.pk/unplugged11
  • 8. Browser Geolocation with Wifi @aaronpk aaron.pk/unplugged11
  • 9. Browser Geolocation @aaronpk aaron.pk/unplugged11
  • 10. Browser Geolocation @aaronpk aaron.pk/unplugged11
  • 11. Finding the User’s Location using Javascript @aaronpk aaron.pk/unplugged11
  • 12. Browser Geolocation @aaronpk aaron.pk/unplugged11
  • 13. 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 @aaronpk aaron.pk/unplugged11
  • 14. Using SimpleGeo Start with IP-based geolocation to quickly center the map. Update with browser-based geolocation after it’s available. aaron.pk/unplugged11 @aaronpk aaron.pk/unplugged11
  • 15. Finding Nearby Businesses ! SimpleGeo Places !   Foursquare API !   Twitter API !   Yelp API !   Google Places API !   Many others @aaronpk aaron.pk/unplugged11
  • 16. Place Search with Foursquare developer.foursquare.com @aaronpk aaron.pk/unplugged11
  • 17. Place Search with SimpleGeo @aaronpk aaron.pk/unplugged11
  • 18. Place Search with SimpleGeo aaron.pk/unplugged11 @aaronpk aaron.pk/unplugged11
  • 19. Finding Information About a Location @aaronpk aaron.pk/unplugged11
  • 20. SimpleGeo Context @aaronpk aaron.pk/unplugged11
  • 21. SimpleGeo Context @aaronpk aaron.pk/unplugged11
  • 22. Monitoring Continuous Location @aaronpk aaron.pk/unplugged11
  • 23. Monitoring Continuous Location in Javascript Now go run around outside! (But keep the browser open) @aaronpk aaron.pk/unplugged11
  • 24. Keep the browser open? That’s kind of lame. @aaronpk aaron.pk/unplugged11
  • 25. Monitoring Continuous Location on the iPhone This will keep running in the background! (But now you will potentially drain the battery) @aaronpk aaron.pk/unplugged11
  • 26. Saving battery by Getting the User’s Approximate Location @aaronpk aaron.pk/unplugged11
  • 27. Retrieving Approximate Location on the iPhone [locationManager startMonitoringSignificantLocationChanges]; •  Your app will be re-launched in the background when the user moves “significantly” •  Most likely when they change cell towers •  Location is very rough, ~500-1500m accuracy @aaronpk aaron.pk/unplugged11
  • 28. Retrieving Approximate Location on Android locationManager.requestLocationUpdate( LocationManager.PASSIVE_PROVIDER, 0, 0, listener); •  Service runs in the background, gets locations when other providers or apps request location. •  Could be cell tower location, could be GPS @aaronpk aaron.pk/unplugged11
  • 29. Location-Based Triggers @aaronpk aaron.pk/unplugged11
  • 30. Geonotes Try it! aaron.pk/geonote Location-Based Reminders @aaronpk aaron.pk/unplugged11
  • 31. Trigger-Based Actions Create triggers based on where users are. @aaronpk aaron.pk/unplugged11
  • 32. Send a message to all users within a radius. @aaronpk aaron.pk/unplugged11
  • 33. Arrived Notify X when you arrive at place Y @aaronpk aaron.pk/unplugged11
  • 35. mapattack.org @aaronpk aaron.pk/unplugged11
  • 36. Hybrid Web/Native App Web Views @aaronpk aaron.pk/unplugged11
  • 37. Communicating Between the Web and Native Components @aaronpk aaron.pk/unplugged11
  • 38. Communicating Between the Web and Native Components @aaronpk aaron.pk/unplugged11
  • 39. Turning On/Off Your Lights Geoloqi  API   Your  Home   Server   X10   SMSified.com   Your  Home   And sending an SMS when you leave work Lights   @aaronpk aaron.pk/unplugged11
  • 40. X10 Lamp Switch Linux Command Line X10 Client www.heyu.org $ heyu on A1 @aaronpk aaron.pk/unplugged11
  • 41. @aaronpk aaron.pk/unplugged11
  • 42. Create a Layer in Geoloqi Docs: geoloqi.org/API/layer/create @aaronpk aaron.pk/unplugged11
  • 43. Create a Trigger in Geoloqi Docs: geoloqi.org/API/trigger/create @aaronpk aaron.pk/unplugged11
  • 44. Handling a Trigger from Geoloqi Docs: geoloqi.org/Trigger_Callback @aaronpk aaron.pk/unplugged11
  • 45. Create an SMS Number smsified.com      or      tropo.com   @aaronpk aaron.pk/unplugged11
  • 46. Send an SMS @aaronpk aaron.pk/unplugged11
  • 47. Questions? Code: aaron.pk/unplugged11 Geoloqi API: geoloqi.org/API SMS API: smsified.com Aaron Parecki @aaronpk @aaronpk aaron.pk/unplugged11