You don't need to modify protocol. It already supports custom attributes. Just add your attribute to the request and it will be handled automatically by the server.
Great !
If I add ...&speed={5}&data1{25}&data2{25}
I will able to have this datas (data1 and data2) in my database ?
Where can I read complete documentation about this protocol ?
I don't find it.
Thank you
Yes, if you add data1 and data2 or any other parameter, it would be saved in the database. Note that it has to be a valid HTTP query attribute (you are missing equals sign).
Here is the only documentation available:
Thank!
Traccar is a very good solution.
Have a nice day Anton,
How can i display an additional attribute in main screen when selecting vehicle ? Eg like speed?
All additional attributes are always displayed.
Hmm. I did not see any of those i defined per device and group. Fresh install on win2012
@machitza, are your talking about OsmAnd protocol attributes? If not, this is not the right place to ask your question, and you have to be provide more context.
hmm.. guess not... but where can i ask these kind of questions?
1.I'm not talking about extending osmand protocol, just want to send from my app additional fields which will be
displayed in main screen (like lat,lang,speed,etc...).
2.How can i disable any of those fields? (like latitude for example)
thanks!
I'm confused. If you are talking about protocol attributes, then what do you mean by "I defined per device and group"?
Actually i'm not talking about osmand protocol.... i just want to send from a php page just like this one
https://www.traccar.org/osmand/
http://demo.traccar.org:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}
i will call the url something like http://demo.traccar.org:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}&myAttribute={TEST}&my_ZZZZZ={1121215}
and those 2 field should be displayed in the main screen when i select the device under the standard fields
First of all, you should not include curly braces in the parameters. Secondly, as I said before, all parameters are automatically decoded by Traccar. You don't need to do anything extra.
I know about the braces...so i do not have to define any parameter?
No, you don't need to define anything.
Dear Support,
I would like extend protocol to send other datas calculated on my smartphone.
Can I simply modify OsmAndProtocolDecoder.java ?
Thank you.
Eric