Custom URL: How to identify a specific phone by parameters
Closed this issue · 1 comments
Hi folks,
Thank you so much for providing and maintaining this repository.
I stumbled over it and could straight setup the Custom URL
use case. Kudos!
I did manage to receive the HTTP request at a test server.
Here are my settings.
# performance
## log gps/gnss locations
Checked
## log network locations
Checked
## log passive locations
Unchecked
## logging interval
60s
## keep gps on between fixes
Unchecked
# log to custom url
## log to custom url
Checked
## allow auto sending
Unchecked
## discard offline locations
Checked
## Url
https://<host>/log?lat=%LAT&lon=%LON&time=%TIME&s=%SPD&id=%AID&ser=%SER
## Http method
POST
My test server is receiving data from the phone successfully. For instance, refer to this log entry.
debug log:post() req.query: {"lat":"52.2659353","lon":"10.4395512","time":"2023-10-18T14:37:22.968Z","s":"0.0","id":"e947f7532e668010","ser":"e947f7532e668010"} +0ms
The next test shall involve multiple phones. That raises the questions
- What does the parameters
%AID
and%SER
actually mean? - How do I bring a specific phone and a specific
aid
orser
location entry together?
For instance, my test server received the following 3 location entries.
debug log:post() req.query: {"lat":"52.265885","lon":"10.4395772","time":"2023-10-18T14:58:18.675Z","s":"0.0","id":"e10c33ef1aa1cc22","ser":"e10c33ef1aa1cc22"} +0ms
debug log:post() req.query: {"lat":"52.2659163","lon":"10.43957","time":"2023-10-18T14:59:21.843Z","s":"0.0","id":"e10c33ef1aa1cc22","ser":"e10c33ef1aa1cc22"} +0ms
debug log:post() req.query: {"lat":"52.265915","lon":"10.4395847","time":"2023-10-18T15:00:21.978Z","s":"0.0","id":"e10c33ef1aa1cc22","ser":"e10c33ef1aa1cc22"} +0ms
Can you tell those 3 entries apart?
They originate in 2 different phones. I need to know exactly which entry comes from which phone.
Any idea?
Appreciate! Cheers!
AID is Android ID, you can read a bit about it here. It's meant to be unique enough to identify a device, but handsets and OSes can exist where it sends non-unique information. However in latest Android versions it does seem to work properly and send a unique enough ID anyway.
SER is Build Serial, another unique identifier but kept for backward compatibility. It only works on older Android OS versions, on newer versions it should return the same as AID, which is what you see above.
If you're trying to identify different phones you're not limited to just those parameters. You can make up your own hardcoded values, for example &deviceid=my_first_phone
and on another phone, &deviceid=the_other_phone