Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the current latitude and longitude in Android Application? [duplicate]

I want to find latitude and longitude of my current location in android application.Its not on location changed .i got the latitude and longtitude value while location Changed.but i need the Current location of latitude and longitude.How to do this?

like image 518
Mercy Avatar asked Jan 09 '12 13:01

Mercy


People also ask

How can I get current latitude and longitude in Android?

Steps to get current latitude and longitude in Android Location permissions for the manifest file for receiving the location update. Create LocationManager instance as a reference to the location service. Request location from LocationManager. Receive location update from LocationListener on change of location.

How do I find my current latitude and longitude?

Android: Open Google Maps; it will zoom to your approximate location. Press and hold on the screen to drop a pin marker. Click on the dropped pin; latitude and longitude will be displayed below the map.

How do you copy longitude?

To copy the coordinates, left-click on the latitude and longitude. They will be automatically copied to your clipboard so that you can save them for later or paste them into a message to share with others.

How can I get my current location in Android?

There are two ways to get the current location of any Android device: Android's Location Manager API. Fused Location Provider: Google Play Services Location APIs.


1 Answers

Read Android document for Obtaining User Location

like image 74
rajpara Avatar answered Oct 25 '22 01:10

rajpara