Location Sensor Not working

I have used a simple locationsensor.LocationChanged block.
I have assigned the latitude and longitudes to labels, but when i run the app the labels don't show the latitude and longitude.

Can you show your blocks. Are you sure your location changed while running the app? It can take some time before a locationchanged gets noticed.

Is the sensor enabled or not?

I have used it in an app and it take it time to sense the location.

@12-D_KB_SCIENCE , @Pythony

Have you read the LocationSensor tutorial? This Using the Location Sensor probably explains why you think you have issues. Are you testing inside a building? Go outside and you might see a result when the building does not block the signals from the gps satellites.

The tutorial contains two aia Projects. If you load these, do they work and your Project does not?

  • are you using an android or the emulator? The emulator will not normally produce a result, use a cell phone or a tablet that has a gps receiver. A device won't produce a result immediately, the gps hardware has to wake up to know where it is.
  • show your code please to get specific advice.

Yes, as described in the tutorial, it may take 30 to 60 seconds to determine where it is located while it achieves a satellite fix, subsequent location changes can occur more rapidly.

1 Like

Today the location sensor is not working. Are there any policy changes? Or is there something else that causes the sensor location to not work?

What is not working? The response you show in the Map component is consistent with a location at 0 latitude and 0 longitude. These coordinates is a spot in the Atlantic Ocean and is the default location that is used when the gps hardware has not yet achieved a satellite fix.

  • no policy changes
  • there are many reasons a device might not receive a satellite fix . see
  • other reasons might be not waiting long enough for the fix to occur; raining outside; testing while in a location that has buildings or mountains obscuring the open sky so that the gps receiver cannot hear more than 3 gps satellites.

Without knowing how your app asked the LocationSensor to work we can only guess.

Is this a new app that worked before and is not working now? Are you using the app in a new phone (Android ???),

Without an image of your Blocks or an aia and a better description of what is not working; no one can provide specific advice. :cry:

  1. latitude 0 and longitude 0 are the results displayed from the location sensor. I've moved to different locations but the result is the same.
  2. Android version 10. I used this cellphone in 2023 for a location map application using the Taifun location sensor (paid) and it runs normally.
  3. I used location sensor change but there is no change.
  1. Check properly AvailableProviders to see, if gps is available
  2. If yes, Set ProviderName to gps
  3. Lock the provider
  4. Go outside for tests to get a better gps signal

Taifun

Thank You. The location sensor is working. There is a problem with the location device on the cellphone