Read More
Read now

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

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

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

    Back to Home