Recording interruptions on Galaxy J5
I have recently started using Strava on a Samsung Galaxy J5 (Android 7.0). On this phone Strava interrupts the recording of position various times during each ride; when it restarts, it creates an artificial straight line between the last point recorded and the present point. This results in errors of up to 50% in ride distance and average speed. This all happens with the phone in the back pocket, there is no user input to stop or re-start the recording.
How can I prevent Strava from interrupting the recording on this phone?