Issue
Endomondo or similar Sport tracker applications randomly losing – dropping GPS signal during the workout, when used on Android 5.x Lollipop or 6.x Marshmallow with the screen turned off. Sometimes Endomondo app uses all the available RAM and forces the phone to reboot. This happens even if the “app optimization” in battery menu is turned off. Hard reset of the phone or clean install of Endomondo (tried different versions) also didn’t help.
The workaround described below works with Endomondo for Android, but should also work with other fitness tracking apps if adjusted properly. Disclaimer: It has some negative impact on the phones battery life during the workout, since the screen is not turned off.