In addition the the app mentioned above...also look at other smartphone fitness apps like Strava or MapMyRun. They’re sort of like Facebook for athletes. You have friends (if you want), can compare your workouts to theirs, track your miles/times/route/calories/efforts/etc. These apps generally have a free version...which for me is all I need. But there are also paid subscriptions that give you access to a few more of their applications. These apps can be cell phone battery drainers. But I turn my on and then put the screen lock on and put it in my pocket and forget about it. Sometimes I might check it mid-ride/run. But I don’t have a problem with battery at all. I use the Strava app to chart my workouts...and I also usually wear a GPS watch. Comparatively, the app is just as accurate as the GPS watch. You can use the apps for all sorts of fitness activities. Obviously cycling and running. But also swimming, hiking, kayaking/canoeing, climbing,...the list goes on.
Dan