How do I get current location (address .. reverse geocode)?

How to get current location in a label example- At this time I am in Sangrampur gopal of Bihar and I want that I got Sangrampur gopal in a label.
I want also to get in which village he live

Show us your Blocks Faraz.

Right-mouse in the Blocks work area and select "Download Blocks as image"

You are using the LocationSensor Blocks? The actual level of detail varies and the Smartphone needs to be in a good GPS reception area. The location sensor is triggered by movement so you need to walk at least 5 meters to get a sensible result.

Also @Faraz_Firoz you know there is a search option in the community :mag:

1 Like

You already have the current location if you use the LocationSensor. That is the latitude and longitude coordinates.

What you want is the address. How to get that is discussed in this tutorial

Be aware, addresses are not available for all location.

Screenshot (140)

Oh I do not know about this :laughing: :laughing:

I got that no address available

:cry: That is because Google uses a database to determine an address and that information is not available for all locations. Users will get that response if they are in a farmer's field, a crowded city and other places. \

Is there any way to get location at any place

  • the LocationSensor.CurrentAddress provides a street address for most locations. It is the best data available probably anywhere.
  • use a Map component to display a map to show where the Android is located.
  • you might be able to use this service
  • what you want to do is called reverse geocoding. This is what the LocationSensor does for an address provided by your gps hardware You might like to see this description Geocoding API overview  |  Google for Developers

Provide the geocoordinates (latitude and longitude) so we can see where you need the address and perhaps I can offer more specific advice.

Perhaps this will help