Finally something that has been requested for some time, the android version of GpsTracker is in the Google Play Store:
https://play.google.com/store/apps/details?id=com.websmithing.gpstracker
This version has many significant enhancements. The most important is that it now has google play location services running in a background service. Also, location updates will restart automatically if the phone is restarted. Please download and test the app and let me know how it works! If you want to have a look at the source code, you can find it here:
https://github.com/nickfox/GpsTracker/tree/master/phoneClients/android
Wish i had the funds to hire you……..AWESOME work bless.
Hi,
Apache reported an error stating that the distance was not a correct sql decimal. So just before sending the data to the sql database I inserted a str-replace. Maybe an option to do this in your version also.
Hey Wim
Could you possibly paste the exact error from Apache.
thanks
n
[Sun Nov 16 12:48:12.764205 2014] [php5:error] [pid 31615] [client 217.120.158.143:57795] PHP Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000]: General error: 1366 Incorrect decimal value: ‘1,4’ for column ‘_distance’ at row 1′ in /srv/www/htdocs/gpstracker/updatelocation.php:59\nStack trace:\n#0 /srv/www/htdocs/gpstracker/updatelocation.php(59):
I’ve added $distance=str_replace(“,”,”.”,$distance); to updatelocation.php and that solved the problem
That’s very interesting. I see the problem now, the phone is using a different locale. Is it British or some other European locale?
I’ll have to think about the best way to handle this. It might be best to deal with it on the phone itself.
http://stackoverflow.com/questions/3821539/decimal-separator-comma-with-numberdecimal-inputtype-in-edittext
n
Yup, the phone is located in the netherlands.
Updating the app would also solve the problem.
The next question will follow soon as i intend to change the route display to poly lines and add the possibility to show gpx tracks.
thanks for the great work you’ve already done.
What’s troubling me about this is the following. There are 4 possibilities here:
1) phone’s locale is European, mysql’s locale is American
2) phone – American, mysql – European
3) phone – American, mysql – American
4) phone – European, mysql – European
1 and 2 are the obvious problem but I haven’t convinced myself that a simple replace function will correctly handle those 2 use cases. One possibility that I’m thinking of is to determine the locale of the phone and send that to the web service and then determine the locale of the mysql db and then using the replace function appropriately. It’s a lot of extra work software-wise. I haven’t given it enough thought to determine if there is a better way. Let me know if you can think of something better.
n
As far as I know, Mysql accepts only the dot as a decimal-separator.
Hey Wim
Just pushed out the latest release with your fixes for decimal handling. Thanks!
https://github.com/nickfox/GpsTracker/releases/tag/v4.0.3
n
Hello Nick,
In the phone client, the path to the updatelocation.php always change to the default value which is https://www.websmithing.com/gpstracker/updatelocation.php once App was closed and reopen it again. Sometime it start with https:// which I have only http://
Please kindly advise.
Regards,
Borin
Hey Borin
Not sure what client you are talking about. ios or android? Did you set a breakpoint and see what is happening to variables?
n