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.

 

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

More From DevX