devxlogo

You Are Here: Using GPS and Google Maps in Android

You Are Here: Using GPS and Google Maps in Android

n the previous article in the Android series, you learned how to integrate the Google Maps into your Android application. One of the really neat ways you can use Google Maps is to send GPS data directly into it so that you can view your current location real-time. This article will show you how to programmatically access the data returned by your built-in GPS receiver and then send the data to Google Maps.

Creating the Project

Using Eclipse, create a new Android project and name it GPS.java.

To use GPS functionality in your Android application, you’ll need to add the ACCESS_FINE_LOCATION permission to the AndroidManifest.xml file:

                                                                                            

In Android, location-based services are provided by the LocationManager class located in the android.location package. Using the LocationManager class, your application can obtain periodic updates of the device’s geographical locations as well as fire an intent when it enters the proximity of a certain location.

 

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist