I implemented a solution where I listen on tap events on the Ext.Viewport to be able to know if the app is active or not. If the user hasn't been using the app for two minutes, then I stop the gps updates by calling this code:
If the user comes back to the app I restart the geolocation update again.
This seems to work as intended. No geolocation update events are fired in the app. So the geolocation seems to be off. But, the GPS symbol (To the top left in the statusbar) on Android does not disappear. This makes me wonder if the GPS is still active, even though I called the clearWatch() function to stop GPS updates.
Is there a way to stop the GPS completely within the app? Or do I not have to worry about this? It is the battery performance on Android that is my concern here.