SlideShare une entreprise Scribd logo
1  sur  12
Android Application Development
           GPS Access




                                     Ahsanul Karim
                        ahsanul.karim@sentinelbd.com
                             Sentinel Solutions Ltd.
                           http://www.sentinelbd.com
GPS Technology: Simplified
• The Global Positioning System (GPS) is a satellite-based navigation system made
up of a network of 24 satellites placed into orbit by the U.S. Department of Defense.
• GPS was originally intended for military applications, but in the 1980s, the
government made the system available for civilian use.
• GPS works in any weather conditions, anywhere in the world, 24 hours a day.
• There are no subscription fees or setup charges to use GPS.
GPS Technology: Simplified (Contd.)
 • Global Positioning System satellites transmit signals to equipment (receivers)
   on the ground. GPS receivers passively receive satellite signals; they do not
   transmit.
 • GPS receivers require an unobstructed view of the sky
 • Depend on a very accurate time reference, which is provided by atomic clocks
   at the U.S. Naval Observatory. Each GPS satellite has atomic clocks on board.
 • Each GPS satellite transmits data that indicates its location and the current
   time.
 • All GPS satellites synchronize operations so that these repeating signals are
   transmitted at the same instant.
 • The signals, moving at the speed of light, arrive at a GPS receiver at slightly
   different times because some satellites are farther away than others.
 • The distance to the GPS satellites can be determined by estimating the amount
   of time it takes for their signals to reach the receiver.
 • When the receiver estimates the distance to at least four GPS satellites, it can
   calculate its position in three dimensions.
 • There are at least 24 operational GPS satellites at all times. The satellites,
   operated by the U.S. Air Force, orbit with a period of 12 hours.
GPS Technology: Determining Position
GPS Access
 1. Create a project Named “UseGps”
 2. We need to add some permissions to use GPS and Internet
GPS Access
 3. Now we need add a location listener, so each time the GPS senses a new location,
 this callback function will be called from the android system.

 To do this, we need to add the fallowing code in the onCreate() method:
GPS Access
 4. We now have to create MyLocationListener class that implements LocationListener and
 Implement methods for various events:
     · onLocationChanged ( Location Update )
     · onProviderDisabled ( GPS Off )
     · onProviderEnabled (GPS On )
GPS Access
GPS Access
 5. Now we run the app in emulator and use emulator control to emulate the GPS module
GPS Access
 6. Now we’ll add a webview to main.xml layout and show the location in a map




 7. Capture the webview by findViewById()
GPS Access
  8. Now when the location is changed




    9. Lets run it again
GPS Access

Contenu connexe

Tendances

Tendances (20)

Gps03
Gps03Gps03
Gps03
 
GPS Presentation
GPS PresentationGPS Presentation
GPS Presentation
 
Gps
GpsGps
Gps
 
Gps
GpsGps
Gps
 
Global positioning system GPS
Global positioning system GPSGlobal positioning system GPS
Global positioning system GPS
 
How gps works
How gps worksHow gps works
How gps works
 
How GPS Works ?
How GPS Works ? How GPS Works ?
How GPS Works ?
 
GLOBAL POSITIONING SYSTEM (GPS)
GLOBAL POSITIONING SYSTEM (GPS) GLOBAL POSITIONING SYSTEM (GPS)
GLOBAL POSITIONING SYSTEM (GPS)
 
Handheld GPS Training for Municipal Use
Handheld GPS Training for Municipal UseHandheld GPS Training for Municipal Use
Handheld GPS Training for Municipal Use
 
DIFFERENTIAL GPS
DIFFERENTIAL GPSDIFFERENTIAL GPS
DIFFERENTIAL GPS
 
Gps surveying
Gps surveyingGps surveying
Gps surveying
 
Dgps concept
Dgps conceptDgps concept
Dgps concept
 
An Introduction To GPS for Geocachers
An Introduction To GPS for GeocachersAn Introduction To GPS for Geocachers
An Introduction To GPS for Geocachers
 
Gps navigation
Gps navigationGps navigation
Gps navigation
 
Application of gps
Application of gpsApplication of gps
Application of gps
 
Global Positioning System
Global Positioning System Global Positioning System
Global Positioning System
 
gps technology
gps technologygps technology
gps technology
 
Ajal gps
Ajal gpsAjal gps
Ajal gps
 
presentation on gps
presentation on gpspresentation on gps
presentation on gps
 
GPS Receiver ICS2014
GPS Receiver ICS2014GPS Receiver ICS2014
GPS Receiver ICS2014
 

En vedette

Android before getting started
Android before getting startedAndroid before getting started
Android before getting startedAhsanul Karim
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI WidgetsAhsanul Karim
 
Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Ahsanul Karim
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_startedAhsanul Karim
 
Lecture 3 getting active through activities
Lecture 3 getting active through activities Lecture 3 getting active through activities
Lecture 3 getting active through activities Ahsanul Karim
 
Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3Ahsanul Karim
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsAhsanul Karim
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivityAhsanul Karim
 
Sensors in Android (old)
Sensors in Android (old)Sensors in Android (old)
Sensors in Android (old)Ahsanul Karim
 
Action Bar Sherlock tutorial
Action Bar Sherlock tutorialAction Bar Sherlock tutorial
Action Bar Sherlock tutorialAhsanul Karim
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Ahsanul Karim
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAhsanul Karim
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studioParinita03
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Ahsanul Karim
 

En vedette (20)

Android before getting started
Android before getting startedAndroid before getting started
Android before getting started
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
 
GCM for Android
GCM for AndroidGCM for Android
GCM for Android
 
Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2Android Workshop Day 1 Part 2
Android Workshop Day 1 Part 2
 
Mcq peresentation
Mcq  peresentationMcq  peresentation
Mcq peresentation
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
 
Lecture 3 getting active through activities
Lecture 3 getting active through activities Lecture 3 getting active through activities
Lecture 3 getting active through activities
 
Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3Android Workshop: Day 1 Part 3
Android Workshop: Day 1 Part 3
 
Android 1.8 sensor
Android 1.8 sensorAndroid 1.8 sensor
Android 1.8 sensor
 
List Views
List ViewsList Views
List Views
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
Android MapView and MapActivity
Android MapView and MapActivityAndroid MapView and MapActivity
Android MapView and MapActivity
 
Sensors in Android (old)
Sensors in Android (old)Sensors in Android (old)
Sensors in Android (old)
 
Training android
Training androidTraining android
Training android
 
Action Bar Sherlock tutorial
Action Bar Sherlock tutorialAction Bar Sherlock tutorial
Action Bar Sherlock tutorial
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
 
Android Services
Android ServicesAndroid Services
Android Services
 
Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)
 

Similaire à Day 9: Make Your App Location Aware using Location API

Similaire à Day 9: Make Your App Location Aware using Location API (20)

A seminar on GPS Technology
A seminar on GPS TechnologyA seminar on GPS Technology
A seminar on GPS Technology
 
GPS technology s.pptx
GPS technology s.pptxGPS technology s.pptx
GPS technology s.pptx
 
Global positioning system(GPS)
Global positioning system(GPS)Global positioning system(GPS)
Global positioning system(GPS)
 
Presentation on GPS by Harvendra Singh
Presentation on GPS by Harvendra SinghPresentation on GPS by Harvendra Singh
Presentation on GPS by Harvendra Singh
 
Siddu0987 (1)
Siddu0987 (1)Siddu0987 (1)
Siddu0987 (1)
 
Gps technology 2020
Gps technology 2020Gps technology 2020
Gps technology 2020
 
PERFORMANCE TESTING OF TRIMBLE GEOEXPLORER 3 GLOBAL POSITIONING SYSTEM RECEIVER
PERFORMANCE TESTING OF TRIMBLE GEOEXPLORER 3 GLOBAL POSITIONING SYSTEM RECEIVERPERFORMANCE TESTING OF TRIMBLE GEOEXPLORER 3 GLOBAL POSITIONING SYSTEM RECEIVER
PERFORMANCE TESTING OF TRIMBLE GEOEXPLORER 3 GLOBAL POSITIONING SYSTEM RECEIVER
 
Global Positioning system GPS - Dr. S. Balamurugan
Global Positioning system GPS - Dr. S. BalamuruganGlobal Positioning system GPS - Dr. S. Balamurugan
Global Positioning system GPS - Dr. S. Balamurugan
 
GPS.pptx
GPS.pptxGPS.pptx
GPS.pptx
 
Global position system
Global position systemGlobal position system
Global position system
 
Global positioning system
Global positioning systemGlobal positioning system
Global positioning system
 
GPS in Planning
GPS in PlanningGPS in Planning
GPS in Planning
 
Gps
GpsGps
Gps
 
Global positioning system
Global positioning systemGlobal positioning system
Global positioning system
 
physics
physicsphysics
physics
 
Missile guidance
Missile guidanceMissile guidance
Missile guidance
 
Global positioning system 1
Global positioning system  1Global positioning system  1
Global positioning system 1
 
Global positioning system 1
Global positioning system  1Global positioning system  1
Global positioning system 1
 
UNIT 6 introduction to gps
UNIT 6 introduction to gpsUNIT 6 introduction to gps
UNIT 6 introduction to gps
 
GPS-1 (1).ppt
GPS-1 (1).pptGPS-1 (1).ppt
GPS-1 (1).ppt
 

Plus de Ahsanul Karim

Lecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesLecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesAhsanul Karim
 
Lecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewLecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewAhsanul Karim
 
Lecture 1 Session 1 Before Getting Started
Lecture 1 Session 1 Before Getting StartedLecture 1 Session 1 Before Getting Started
Lecture 1 Session 1 Before Getting StartedAhsanul Karim
 
লেকচার ১ (ক)- শুরুর আগে:
লেকচার ১ (ক)- শুরুর আগে:লেকচার ১ (ক)- শুরুর আগে:
লেকচার ১ (ক)- শুরুর আগে:Ahsanul Karim
 
Day 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts APIDay 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts APIAhsanul Karim
 
Day 15: Working in Background
Day 15: Working in BackgroundDay 15: Working in Background
Day 15: Working in BackgroundAhsanul Karim
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsAhsanul Karim
 
Day 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentDay 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentAhsanul Karim
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycleAhsanul Karim
 
Day 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through ActivitiesDay 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through ActivitiesAhsanul Karim
 
Day 2 android internals a quick overview
Day 2 android internals a quick overviewDay 2 android internals a quick overview
Day 2 android internals a quick overviewAhsanul Karim
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedAhsanul Karim
 
Mobile Banking in Bangladesh: An Incomplete Study
Mobile Banking in Bangladesh: An Incomplete StudyMobile Banking in Bangladesh: An Incomplete Study
Mobile Banking in Bangladesh: An Incomplete StudyAhsanul Karim
 
Ui layout (incomplete)
Ui layout (incomplete)Ui layout (incomplete)
Ui layout (incomplete)Ahsanul Karim
 
Introduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedIntroduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedAhsanul Karim
 

Plus de Ahsanul Karim (17)

Lecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & PreferencesLecture 5: Storage: Saving Data Database, Files & Preferences
Lecture 5: Storage: Saving Data Database, Files & Preferences
 
Lecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick OverviewLecture 2(b) Android Internals A Quick Overview
Lecture 2(b) Android Internals A Quick Overview
 
Lecture 1 Session 1 Before Getting Started
Lecture 1 Session 1 Before Getting StartedLecture 1 Session 1 Before Getting Started
Lecture 1 Session 1 Before Getting Started
 
লেকচার ১ (ক)- শুরুর আগে:
লেকচার ১ (ক)- শুরুর আগে:লেকচার ১ (ক)- শুরুর আগে:
লেকচার ১ (ক)- শুরুর আগে:
 
Day 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts APIDay 15: Content Provider: Using Contacts API
Day 15: Content Provider: Using Contacts API
 
Day 15: Working in Background
Day 15: Working in BackgroundDay 15: Working in Background
Day 15: Working in Background
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
Day 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver ComponentDay 6: Android BroadcastReceiver Component
Day 6: Android BroadcastReceiver Component
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycle
 
Day 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through ActivitiesDay 4: Android: Getting Active through Activities
Day 4: Android: Getting Active through Activities
 
Day 2 android internals a quick overview
Day 2 android internals a quick overviewDay 2 android internals a quick overview
Day 2 android internals a quick overview
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting Started
 
Mobile Banking in Bangladesh: An Incomplete Study
Mobile Banking in Bangladesh: An Incomplete StudyMobile Banking in Bangladesh: An Incomplete Study
Mobile Banking in Bangladesh: An Incomplete Study
 
Ui layout (incomplete)
Ui layout (incomplete)Ui layout (incomplete)
Ui layout (incomplete)
 
AndroidManifest
AndroidManifestAndroidManifest
AndroidManifest
 
Introduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting StartedIntroduction to Android Development: Before Getting Started
Introduction to Android Development: Before Getting Started
 
Client-Server
Client-ServerClient-Server
Client-Server
 

Dernier

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
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
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 

Dernier (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 

Day 9: Make Your App Location Aware using Location API

  • 1. Android Application Development GPS Access Ahsanul Karim ahsanul.karim@sentinelbd.com Sentinel Solutions Ltd. http://www.sentinelbd.com
  • 2. GPS Technology: Simplified • The Global Positioning System (GPS) is a satellite-based navigation system made up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. • GPS was originally intended for military applications, but in the 1980s, the government made the system available for civilian use. • GPS works in any weather conditions, anywhere in the world, 24 hours a day. • There are no subscription fees or setup charges to use GPS.
  • 3. GPS Technology: Simplified (Contd.) • Global Positioning System satellites transmit signals to equipment (receivers) on the ground. GPS receivers passively receive satellite signals; they do not transmit. • GPS receivers require an unobstructed view of the sky • Depend on a very accurate time reference, which is provided by atomic clocks at the U.S. Naval Observatory. Each GPS satellite has atomic clocks on board. • Each GPS satellite transmits data that indicates its location and the current time. • All GPS satellites synchronize operations so that these repeating signals are transmitted at the same instant. • The signals, moving at the speed of light, arrive at a GPS receiver at slightly different times because some satellites are farther away than others. • The distance to the GPS satellites can be determined by estimating the amount of time it takes for their signals to reach the receiver. • When the receiver estimates the distance to at least four GPS satellites, it can calculate its position in three dimensions. • There are at least 24 operational GPS satellites at all times. The satellites, operated by the U.S. Air Force, orbit with a period of 12 hours.
  • 5. GPS Access 1. Create a project Named “UseGps” 2. We need to add some permissions to use GPS and Internet
  • 6. GPS Access 3. Now we need add a location listener, so each time the GPS senses a new location, this callback function will be called from the android system. To do this, we need to add the fallowing code in the onCreate() method:
  • 7. GPS Access 4. We now have to create MyLocationListener class that implements LocationListener and Implement methods for various events: · onLocationChanged ( Location Update ) · onProviderDisabled ( GPS Off ) · onProviderEnabled (GPS On )
  • 9. GPS Access 5. Now we run the app in emulator and use emulator control to emulate the GPS module
  • 10. GPS Access 6. Now we’ll add a webview to main.xml layout and show the location in a map 7. Capture the webview by findViewById()
  • 11. GPS Access 8. Now when the location is changed 9. Lets run it again