Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8689949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:47:17+00:00 2026-06-12T23:47:17+00:00

In android I can easily get onLocationChanged to work and gets the mobile latitude

  • 0

In android I can easily get onLocationChanged to work and gets the mobile latitude and longitude.

However once I got these coordinates How can I get the address of the mobile e.g

XYWZ Road, GRDSASDF Sector 823432, Australia  etc
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:47:19+00:00Added an answer on June 12, 2026 at 11:47 pm

    Geocoder is a class for handling Geocoding and Reverse Geocoding.

    1. Geocoding is the process of transforming a street address or other
      description of a location into a (latitude, longitude) coordinate.
    2. Reverse Geocoding is the process of transforming a (latitude,
      longitude) coordinate into a (partial) address.

    The amount of detail in a reverse geocoded location description may vary, for example one might contain the full street address of the closest building, while another might contain only a city name and postal code. The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform. Use the isPresent() method to determine whether a Geocoder implementation exists.

    The getFromLocation(double latitude, double longitude, int maxResults) method returns an array of Addresses that are known to describe the area immediately surrounding the given latitude and longitude. The returned addresses will be localized for the locale provided to this class’s constructor.

    The returned values may be obtained by means of a network lookup. The results are a best guess and are not guaranteed to be meaningful or correct. It may be useful to call this method from a thread separate from your primary UI thread.

    Here a Tutorial to get familiar with the Geocoder:

    public class AndroidFromLocation extends Activity {
    
    double LATITUDE = 37.42233;
    double LONGITUDE = -122.083;
    
       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.main);
           TextView myLatitude = (TextView)findViewById(R.id.mylatitude);
           TextView myLongitude = (TextView)findViewById(R.id.mylongitude);
           TextView myAddress = (TextView)findViewById(R.id.myaddress);
    
           myLatitude.setText("Latitude: " + String.valueOf(LATITUDE));
           myLongitude.setText("Longitude: " + String.valueOf(LONGITUDE));
    
           Geocoder geocoder = new Geocoder(this, Locale.ENGLISH);
    
           try {
      List<Address> addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 1);
    
      if(addresses != null) {
       Address returnedAddress = addresses.get(0);
       StringBuilder strReturnedAddress = new StringBuilder("Address:\n");
       for(int i=0; i<returnedAddress.getMaxAddressLineIndex(); i++) {
        strReturnedAddress.append(returnedAddress.getAddressLine(i)).append("\n");
       }
       myAddress.setText(strReturnedAddress.toString());
      }
      else{
       myAddress.setText("No Address returned!");
      }
     } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      myAddress.setText("Canont get Address!");
     }
    
       }
    }
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I easily get date and time as integer values in Android?
Can android recognize more than two simultaneous touches (3, 4, etc...)? Is the number
Can Android be woken up from sleep by a peripheral device such as an
Can Android OS that is installed on actual devices be emulated in VMWare or
In android I can Log(aa,+Object) ,then the object can as string to print,it can
In the android we can see that there is a default google search on
On a touch device like iPhone/iPad/Android it can be difficult to hit a small
I'm looking for a java library that works on the android that can download
I've been messing around with the FaceDetector and Face classes in Android and can't
I want to build a basic Client-Server application, where my android smartphone can stream

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.