Additional API paramenter (transition)

Hello,

Is it possible to add custom values to the demo API? I would like to post a devices current transition state (WALKIN, RUNNING, IN_VEHICLE...etc) as a string via the client to the API and get that transition as a string as part of the positions JSON that is downloaded by the manager. If this is not possible via the demo server can the API be customized to do this for a single paid tracking account?

Anton Tananaev4 years ago

It's possible. You can include any arbitrary data in the OsmAnd protocol request and you will get those values back as attributes.

Wonderful!!! Can you please point me in the direction of any documentation I can use to figure out how to accomplish this using the protocol?

Anton Tananaev4 years ago

Thank you for your reply. Would adding the object and key value to position be enough to accomplish my goal?

Hello,
As a follow-up, is it possible to create a custom json array to store transitions individually?
Ex:

{
    "Transitions":[
        {
            "name":"event.getActivityType()",
            "transitionStartTime":"walkStartTime",
            "transitionExitTime":"walkEndTime",
            "transitionMaxSpeed":"max"
        }
    ]
}
Anton Tananaev4 years ago

Anything is possible. The source code is open.