This object is in archive! 

Api for custom live tracking implementation

Thomas Sellem shared this question 7 years ago
Answered

Hello


I would like to create my own live tracking system ( not based on URL call, but on embedded java library which call directly the server with its own communication protocol). Is it possible to create an addon to add a New live tracking type?

If yes, How?


Thank you.

Replies (3)

photo
1

Good day Thomas,

Live tracking in Locus is based on two main parts.

- first part take care of handling a GPS connection. It's core feature of Locus

- second part is Live tracking service itself, which based on parameters allows to send data to remove server


Feature you are asking means, that you wants to completely skip second part and wants to write it on your own. Because of this, only first part is interesting for you.


So I see two possible solutions here.

1. write completely independent own application. How to work with GPS is describe precisely on many web pages and it's only what you need from Locus itself

2. if you still think that using Locus as background is good idea, you may use system of "Periodic updates" that Locus offer for add-ons. This feature every second send broadcast intent with all possible data to registered receivers in system.


You anyway asked for some direct integration of your system into UI of Live tracking system. This is not possible and it is not planned mainly because of reasons above.


If there will be something I may help, feel free to write me. Thanks for understanding.

photo
1

Hello Menion,


Thank you for your answer.

In fact, what il want is to automatically start my live tracking when i start a new record. I saw that it's an existing feature.

So my idea was to use this recording profil parameter to do what i want.


Perhaps there is an other way to do it. Is there any broadcast to notify a recording start?


Thank you again.

photo
1

Hello Thomas,

understand, anyway some high-tech API to allow deeper integration into Live tracking system is really not planned.

Anyway as you ask ... yes. As I wrote, Locus provide option to register for a Broadcast events. Every second is send intent wit all possible information and also an information if track recording is running or not. So it's quite easy to write such add-on/service.


I'm still too lazy to write something more about "How to work with Locus API" and do it simplier, really sorry for that. So for now, most easy solution is to download this sample https://github.com/asamm/locus-api-android-sample and run it on own device. "Periodic updates" is what you are looking for.


So:

- start Locus and in settings > misc > enable periodic updates

- start Locus API - Sample and open Utils > Dashboard.


This page will display received updates.

Feel free to ask, I'll gladly help with start if there will be any problem.

Replies have been locked on this page!