Check Mobile App
Read now
Start a Project

How to fetch your current location in android

Save

In this blog,
I have shown how to fetch your current location using the older Apis. Google introduce the new API on the basis of the google play services.

 

For any location based application, this functionality is very use full to your user. So there are few steps to fetch your location in android.

 

How to fetch your location

Step 1: First all create a class which extends the Service class and implements the LocationListener,

Step 2: Then create the Location instance and try to get the latitude and longitude by the Location manager,

Create a method which returns the location instance with getting the lat-long,

Step 3: Create the function to getting the Latitude and Longitude,

Step 4: Create another class from where to get the location,

Step 5: After successfully getting the lat-long, we can get the user current location by Reverse Geocoding

Note: Reverse geocoding is the process of back (reverse) coding of a point location (latitude, longitude) to a readable address or place name. This permits the identification of nearby street addresses, places, and/or areal subdivisions such as neighbourhoods, county, state, or country.

 

Source: http://www.androidhive.info/

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

Michael Urresta

Michael Urresta

Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home