Open brantje opened 10 years ago
Yup, including a link to GPSlogger / OSMand as well. (and something for iOS)
For iOS, i have no clue. Don't have an iphone, neither have friends. So that needs to come from someone who has.
What is the URL to use ?
Have looked at the source code and it seems to be for OsmAnd:
You have to change YourAddressToOwnCloud to somethink like example.com/owncloud and YourDeviceHash to the Hash you generated from the gear-menu in the maps-app.
I will test it on the way to home.
I have created an PR to fix an issue with Osmand: #40 With that it should work like expected and the above mentioned adress.
For GPSLogger you can use the following working address: http://_YourAddressToOwnCloud_/index.php/apps/maps/api/1.0/location/update?hash=_YourDeviceHash_&lat=%LAT&lon=%LON×tamp=%TIME&hdop=%ACC&altitude=%ALT&speed=%SPD
Also here: You have to change YourAddressToOwnCloud to somethink like example.com/owncloud and YourDeviceHash to the Hash you generated from the gear-menu in the maps-app.
Just to know: For GPSLogger to use with this feature you need the current version, that is not available in F-Droid. It works with location services at hight and low accuracy and also in the background (only background service and app closed).
Osmand works also with the current version from F-Droid. But it requires one of the folloing scenarios to work:
There is a new app called "Self-Hosted GPS Tracker" in F-Droid that appears to be able to do the right thing -- use this as the URL:
https://foo.example.org/owncloud/index.php/apps/maps/api/1.0/location/update?hash=YourDeviceHash
and it will append the lat=LAT&lon=LON string.
However the app will send start/stop pings to that URL which ends up in the database as NULL values for lat/long. Not ideal, but close.
I have seen this app too and have the check, how to work with this, on my todo. I also want to create some kind of documentation for location tracking.
Is maps reputed to work with the current 8.2.1 ? I currently can not manage to define devices (they are created but table populated with null values) neither to successfully call /location/update URL.
I have now looked into "Self-Hosted GPS Tracker". It is not able to submit hdop, altitude and speed, so they would stay empty. The timestamp is also only submitted with param "t".
@clinique: I have not checked with 8.2.1 until now. Which version of the maps app do you use? Which app with which version do you use to submit the location?
@DJaeger : I took the master version on GitHub. I'm using Owntracks along with a custom node-red to HTTP Get on maps api - but with no success. I tried directly the URL in a browser, this gives me an error stating "to many redirections". I also have errors in owncloud :
{"reqId":"RDN3OPgktV0DealUL5jl","remoteAddr":"81.61.137.133","app":"PHP","message":"Undefined index: ADR at \/usr\/share\/owncloud\/apps\/maps\/controller\/pagecontroller.php#111","level":3,"time":"2015-12-14T08:25:34+00:00"} {"reqId":"RDN3OPgktV0DealUL5jl","remoteAddr":"81.61.137.133","app":"PHP","message":"Attempt to assign property of non-object at \/usr\/share\/owncloud\/apps\/maps\/controller\/pagecontroller.php#195","level":3,"time":"2015-12-14T08:25:34+00:00"}
Setting to 0.2 for now. :) Anyone is welcome to work on this and improve the Maps app
Now, it is not clear how an user can enable device tracking. We might add an ? icon in the 'Location tracking settings' popup. What do you think @jancborchardt