In an app with several Activity's, GPS is turned on in Main in Activity_Resume and turned off in Activity_Pause. I'd like to keep the GPS on when going to another Activity within the application (and during an orientation change), but turn off when killing the application or clicking a button to turn it off. From the lifecycle tutorial, these are the four conditions when Activity_Pause is called, and are occurring in the app:
1. A different activity was started.
2. The Home button was pressed
3. A configuration changed event was raised (orientation changed for example).
4. The Back button was pressed.
Is there a way to get GPS to persist if #1 and/or #3 occur? (really, to only turn off if user exits app or clicks a button to turn it off)
1. A different activity was started.
2. The Home button was pressed
3. A configuration changed event was raised (orientation changed for example).
4. The Back button was pressed.
Is there a way to get GPS to persist if #1 and/or #3 occur? (really, to only turn off if user exits app or clicks a button to turn it off)