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 7908999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:11:43+00:00 2026-06-03T12:11:43+00:00

I am trying to get location address from Geocoder, I am able to get

  • 0

I am trying to get location address from Geocoder, I am able to get latitude and longitude but it returning address with zero length.

Here is my code snippet

            double longi = location.getLongitude();
            double latt = location.getLatitude();

            Geocoder geocoder = new Geocoder(getApplicationContext(), Locale.ENGLISH);

            String add="";
            try {


                List<Address> address = geocoder.getFromLocation(latt/1E6,longi/1E6, 1);


                System.out.println("in location listener "+address.size());


                int i=0;

                if(address.size()>0)
                {
                    for(i=0;i<address.get(0).getMaxAddressLineIndex();i++)
                    {
                        add += address.get(0).getAddressLine(i);
                    }


                    Toast toast  = new Toast(getApplicationContext());
                    toast.makeText(getApplicationContext(), add, Toast.LENGTH_LONG).show();
                }   

            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

Please help me to get it correct. Thanks in advance!

  • 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-03T12:11:49+00:00Added an answer on June 3, 2026 at 12:11 pm

    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.

    See the Geocoder documentation for more information.

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

Sidebar

Related Questions

I need to get address from lon lat location. I was trying with geodecoder
hi i am trying to get latitude and longitude values by address function get_lat_long_from_address($address)
I'm trying to use the geocoding code from here in my ASP.NET MVC 2
I'm trying to get coordinates of address from google map with Classic Asp. When
I am trying to get the placemark for a location but all I am
I am getting a physical location address from a user and trying to arrange
Im trying to use geocoder for displaying a location based on an address. My
I was trying to get variable in Query String from URL. But somehow, its
I'm trying to get the location of Window's Local AppData folder in a version-agnostic
I'm trying to get my location using it like this: LocationManager myLocationManager = (LocationManager)

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.