traccar-client-android icon indicating copy to clipboard operation
traccar-client-android copied to clipboard

Improvement

Open slobglob opened this issue 7 years ago • 12 comments

Added the report interval to the report in order to detect if the client has lost connection

slobglob avatar Feb 01 '18 16:02 slobglob

Can you please explain the use case.

tananaev avatar Feb 01 '18 18:02 tananaev

@tananaev When the device sends a report, the device sends its report interval so the sever knows when to excpect the next report. If the server doesn't get the report in that time (+some buffer) I know that the device went offline due to some reason (i.e. turned off or lost reception).

slobglob avatar Feb 01 '18 19:02 slobglob

Are you planning to implement some modifications on the server side as well? What about iOS?

tananaev avatar Feb 01 '18 19:02 tananaev

Maybe not right now, but possible to do that in the near future. What do you think about that? Do you have any alternative to detect a GPS / Android loosing connection?

slobglob avatar Feb 03 '18 17:02 slobglob

OK, we can merge when everything is ready. Also, the right way of implementing this would be to add a new parameter to the Position model. One more thing I suggest is renaming parameter to something shorter (e.g. "interval").

tananaev avatar Feb 03 '18 19:02 tananaev

I'm not sure if that's correct, the interval isn't really a part of the Position model attributes (logically). Just because we want to send it to the sever doesn't mean it has to be a part of the model. The attribute name can definitely be changed. And OK, we'll wait until all platforms are aligned.

slobglob avatar Feb 04 '18 08:02 slobglob

I think it makes sense to send original interval value at the time when location was captured.

tananaev avatar Feb 04 '18 10:02 tananaev

If you think this is the best approach we can do that, but I'm not sure that's the right way logically. I'll keep you posted on the other platforms so we can merge everything at the same time.

What exactly do I need to change in the server?

slobglob avatar Feb 04 '18 20:02 slobglob

We can either keep server as it is, but ideally we want to use interval for "unknown" status timeout.

tananaev avatar Feb 04 '18 21:02 tananaev

Ok, I'll keep you updated. Thanks.

slobglob avatar Feb 05 '18 08:02 slobglob

I like this idea, and would find it useful.

garyvdm avatar Feb 12 '18 11:02 garyvdm

@slobglob @garyvdm https://github.com/traccar/traccar-client-android/pull/348 implements this and more, if you want to try, feedback welcome.

oliv3 avatar Sep 15 '18 00:09 oliv3