Android Question GPS filter not working

marcick

Well-Known Member
Licensed User
Longtime User
I don't know wich kind of update has affected this, but looks like the GPS filter no longer works properly.
I'm testing it now on Android 8 and B4A8.

The GPS is started with

Code: Copy
GPS1.Start(1000,5) 'Listen to GPS with 1sec and 5mt filter

but in the log I see a lot of events GPS_LocationChanged, regardless of the filter above
And because each location is stored in a database, I have a huge amount of unwanted data.

Code: Copy
10/04/2018 09:59:56 Location changed
10/04/2018 09:59:56 Location changed
10/04/2018 09:59:56 Location changed
10/04/2018 09:59:56 Location changed
10/04/2018 10:00:00 Location changed
10/04/2018 10:00:00 Location changed
10/04/2018 10:00:00 Location changed
10/04/2018 10:00:00 Location changed
10/04/2018 10:00:03 Location changed
10/04/2018 10:00:03 Location changed
10/04/2018 10:00:03 Location changed
10/04/2018 10:00:03 Location changed
10/04/2018 10:00:25 Location changed
10/04/2018 10:00:25 Location changed
10/04/2018 10:00:25 Location changed
10/04/2018 10:01:37 Location changed
10/04/2018 10:01:37 Location changed
10/04/2018 10:01:37 Location changed
Refresh token called: FRBSf0126e7b96fd9df3d4847dbb417f
Save settings
Token uploaded successfully.
10/04/2018 10:02:36 Location changed
10/04/2018 10:02:36 Location changed
10/04/2018 10:02:36 Location changed
10/04/2018 10:02:36 Location changed
10/04/2018 10:02:55 Location changed
10/04/2018 10:02:55 Location changed
10/04/2018 10:02:55 Location changed
10/04/2018 10:03:25 Location changed
10/04/2018 10:03:25 Location changed
10/04/2018 10:03:25 Location changed
Refresh token called: FRBSf0126e7b96fd9df3d4847dbb417f
Save settings
Token uploaded successfully.
10/04/2018 10:10:06 Location changed
10/04/2018 10:10:06 Location changed
10/04/2018 10:10:06 Location changed
10/04/2018 10:10:06 Location changed
10/04/2018 10:10:06 Location changed
10/04/2018 10:10:06 Location changed
10/04/2018 10:10:06 Location changed
10/04/2018 10:17:05 Location changed
10/04/2018 10:17:05 Location changed
10/04/2018 10:17:05 Location changed
10/04/2018 10:17:05 Location changed
10/04/2018 10:17:05 Location changed
10/04/2018 10:17:05 Location changed
10/04/2018 10:17:07 Location changed
10/04/2018 10:17:07 Location changed
10/04/2018 10:17:07 Location changed
 
Well, the filter has always worked as expected (particulary for the timing), something has changed for sure.
And if it has to be considered just an hint it is unuseful, I will add a logic at the beginning of the event to discard locations.
 
Upvote 0
Yes Erel, I was saying "I don't know wich kind of update has affected this".
I'll write my own filter in the event. Thanks.
 
Upvote 0
Looks like also GPS1.STOP has no effect and GPS_LocationChanged event are always generated. Possible ?

edit: there is something in my app that keep the GPS always on and GPS1.STOP has no effect.
I see that a simple new project with GoogleMap works correctly.
I'm investigating.
 
Last edited:
Upvote 0
That is !!!! :mad::mad::eek:o_O
If you call twice GPS1.Start then you can call hundred times GPS1.Stop but no way to stop it.
And yes, that was the reason for multiple location updates and filter not working.
Thanks ....
 
Upvote 0
Back
Top