I have detected that the LocationSensor in iOS always returns inmediatly at begin the app the “last “cache” coordenades* and I can not know if they are the right new coordenades or other old coordenates of the iOS cache sensor. At the end, I have not found any parameter when we can know that we have the right new coordenades and not the wrong cache coordenades. I have tested all the location sensor parameters without success.
Anybody know can I manage this situation?
@ewpatton Would be possible to receive the TimeStamp iOS Location or the CoreLocation? Or clean the “cache” coordenades when the App starts or better when we active the SensorAvailable=true?
@ewpatton My questions to identify and help this issue are:
Does the iOS component forward the first CLLocation it receives from Core Location without filtering it?
Is the CLLocation timestamp available internally but not exposed in AI2?
Would it be possible to add a LocationTimestamp or LocationAge property to the LocationSensor?
Is there a reason why requestLocation() or some filter isn't used to discard old positions when the app starts? (if the current implementation allows it).
So long as the first CLLocation received is valid, we pass it along yes. At that point, we store it internally and check future CLLocation updates against it in time and distance per how the corresponding properties are set on the component.
Yes.
It's something we could probably consider. I will log a feature request for it.
If the OS is reporting it as valid, I don't see a reason to not pass it through. For example, when I come into the office, my location doesn't really change from 9am to 5pm, so a location sample take just before I walk into the office is still valid and it saves battery life not having to listen to GPS all the time. Whether a sample is stale will depend a lot on user behavior and the needs of the application.
The problem is that we are out of the office whith the app closed when we open other time the app in other place than we receive directly as location the prior office location (and this prior location is not right now).