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