5 ms·
There have been a variety of such apps, going at least as far back as "Backitude" (now gone) on Android that could log to a local KML file that could then be up
by fencepost 5y ago
There have been a variety of such apps, going at least as far back as "Backitude" (now gone) on Android that could log to a local KML file that could then be uploaded to storage of your choice on a schedule.
It could also connect to a URL of your specification to upload real-time updates.
Keep in mind that if you're not concerned about immediate tracking you can log locally then use any of many options (e.g. FolderSync) to do scheduled uploads of a log file.