android - How to stop periodic location updates when driver goes out of vehicle? -
in truck, there app running on tablet records location every 60 seconds.
i need stop periodic recording of location, once truck ends driving, further movement of tablet not considered part of route.
e.g. after end of driving, possible driver walks tablet around town.
my ideas solving are:
- a button driver has press when ends driving stop recording - easy implement, there risk driver forgets pressing button
- checking difference between current , previous location - e.g. when distance in meters didn't change more 20 meters in few minutes vehicle considered stopped. of course there's risk vehicle in traffic jam
- use activity recognition google services - use mechanism check activity , once other activity (with high enough confidence), stop recording
what way suggest this?
a button driver has press when ends driving stop recording - easy implement, there risk driver forgets pressing button
i agree you, dangerous let deciding user action of app
checking difference between current , previous location - e.g. when distance in meters didn't change more 20 meters in few minutes vehicle considered stopped. of course there's risk vehicle in traffic jam
in opinion alghoritm not efficient; better checking changes not on meters, 'cause gps sensor have alsways errors during sensing, should check if changes in meters has been changed in value more error (accuracy value); in case quite sure has been changed or not
use activity recognition google services - use mechanism check activity , once other activity (with high enough confidence), stop recording
this intresting, should tested;
however there fourth case: using device (like driver personal smartphone) connected via bluetooth device app recordind gps data , when driver let car devices lost bt connection, trigger caught gps app , case stopping data recording
Comments
Post a Comment