Location sensor stopped working for my APP, on august 29 did work ok setting markers from address on open route map

I.m using Locator sensor in my app to place a marker for the user from the current location and a marker for a destination from a given address, it worked fine until last saturday, august 29th, and since then it is not working. Is there an issue with it?

In addition, I´m using the map from MIT App Inventor palette

Could you give us a better description of what isn't working? We haven't released any updates since Aug 29 so behavioral changes shouldn't be an issue. For location sensor specifically, it uses GPS and so you may need to be outside to get a line-of-sight to the sky to acquire the GPS signal. Putting your device by a window might also work.

GPS work correctly, when my App starts, a pascode is entered, then if the user is in the database, returns the name of the user, which does work correctly, after that, a screen with a map opens, should pan to the current location and the marker for the user location should be set, from the lat and lng obtained from the location sensor, this is not happening, also, the destination marker doe not show (Should get the lat and lng from a typed address).

I tried other apps from the MIT App Gallery the use location sensor and still can not get it to work (like find my car, it does not render the current location either)

Here is a simple example How to put my location on a map. If you code the example, does it work properly? If you can display the location successfully, it indicates your gps receiver is working properly. If it works, you can discount issues with your gps.

With respect to your app

How are you passing the location coordinates to the second screen? You must pass the geocoordinates to the additional screen. Did you add that feature after Aug 29 or make any other changes to your app?

Do you have your Map component on the first or the second screen or both? You cannot show the marker on the second screen unless you pass the coordinates.

You provided the community a fairly detailed explanation of what your blocks are supposed to do (but currently are not doing); a copy of your Blocks image would help diagnose the problem.

Of note, sometimes the panTo block does not do what the developer expects using the OpenStreetMap tiles (top set of Blocks) (the pan glitches and you do not get the expected response) ; I recommend to avoid glitches to use the bottom set of Blocks which does the same thing.

and is more reliable code.

Make sure you have these set LocationSettings in your Android Settings.

Steve JG , i will like to get your help on something but unfortunately it says you are not accepting messages

Thanks for your reply, I will try that later today, and keep you posted.

I have the map component on the second page and in that same page is where I´m gettinig the locator coordinates, this worked fine until last saturday.
Atually, I tried "Simple Navigation Directions by Steve JG" and works perfect, unless you want tu use your current location. Has anybody else experienced this problem with locator sensor?

just tried again my app (indoors) and now works just fine, as well as the "Simple Navigation Directions by Steve JG"
I would be nice to understand what happened from Saturday up to now.

we are back again to the point in which the location sensor is not working, last night my App worked just fine, but this morning it does not render the current location (lat & Lng)

This might indicate

  • you are not getting location updates. Go outside or near a window perhaps. It could be related to how you use the LocationSensor and Map components and how you set the TimeInterval or because you are testing in a building etc.
  • the Pan blocks may not be user friendly when you change screens; substitute the Map1.CenterFromStrings and you might get a better result
  • This might be an OpenStreetsMap server issue. When many users are using their map tile servers an App using OSM might not work well.

It is impossible to test your app. . You have to find the problem. You have an intermittent problem. No one can test since; you have not shared your code or your aia with the community. I suspect the issue is your use multiple screens but I or no one knows. :frowning:

Sorry for geting back until now, I tried the app on another device and works perfect, does it has something to do wiith the Android version, on the phone where it did not work correctly has an Andnroid version 7?

Glad your app works on another device.

I do not know. I cannot test on an Android 7 device and in any case, do not have your code. The problem could be:

  • the Android 7's gps receiver might not be as sensitive as the receiver in your 'other device'. What is the other device? The 'other device' might have a better cpu or is a different brand or its Settings might be different.
  • it might have something to do with the brand of your Android 7
  • it might have something to do with the Location Settings. Check the Settings on your Android 7
  • it might have something to do with how you coded your Blocks. We do not know what you coded.
  • it might have something to do with the virus protection you have on your Android 7 not allowing Location
  • are you testing using Companion or using the built apk? Try you built apk on the Android 7; that might work where using Companion might not.
  • if you are posting Marker coordinates, the issue might be with an overworked OpenStreetMap server providing intermittent postings. Also, if you use the Map component with your app, the issue could be WIFI speed or if you are using network, the network 'speed' (G3 or G4 for instance) stifling transmission of data.
  • "did work ok setting markers from address " ... might depend on how frequently you are posting location information. The LocationSensor, ordinarilly should not be set to refresh more often than every 30 seconds (LocationSensor.TimeInterval = 30000 ms). A quicker refresh is possible on 'some' devices but rapid refreshing will create issues. Perhaps your issue?

All these are guesses. Find a friend with another Android 7 and test your app on your friend's device might help.

Someone else might have other suggestions. Good luck.