I started this reply as I was unable to run your script, but as I was writing and testing at the same time, I finally figured it out.
I'm leaving in a few hours for a 4-day 250 km bike trip, and I will try to test it.
For those who may happen on this topic and are new to Ubuntu Touch (like me), a few things I struggled with:
It requires to be launched from a terminal with it "Prevent app suspension" activated in Tweak app.
You need to install UT Tweak Tool in the OpenStore, launch it, then tap on the menu icon at the top left and select Apps (not sure how it's worded in English, it's an apps list). Next find the Terminal and tap on its entry. It will open a Details window where you will find the "Prevent app suspension" toggle switch.
The script will not start and makes an error because of line 29 of the
It is looking for a "Project" folder that does not exist. You need to change it to the actual name of the folder where the script and the "gpxpy-1.3.5" folder resides, which when downloaded from Gitlab and extracted is by default
gps-utouch-tracker-master. For that I edited it in UT's terminal:
cd gps-utouch-tracker-master nano GPS_tracking.py
Another thing that's necessary to make the script run is to make it executable.
chmod +x GPS_tracking.py
A word of warning: if you forget to activate the terminal's "prevent app suspension" button, once the script is launched, there is no stopping it!!! The CTRL+C button at the bottom will not stop the script. The terminal prompt returns, but GPS points continue to be added. You will have no choice but to quit the terminal and of course no file will be saved.
The gpx files are saved in the
gps-utouch-tracker-master folder, or whatever name you gave it (might be a good idea to rename it ).
It would be cool if it works with some kinda of a UI
Or at least, a minimal GUI to launch, if possible avoid having to enter our password, then a button to stop it... I was thinking of creating a desktop launcher, but I'm out of time, I need to pack and get a few hours of sleep!
Ernest, thanks for your work on Activity Tracker, and for this script!