What would be the best practice in jetpack compose to react to the application being paused, such as the user swapping to another application?
This would be useful such as when the application is playing audio, you don't want the audio to continue playing when the app is in the background.
I know we can override onPause() in the main activity, but how can we aim to let the rest of the application know that it is paused?
j
jaqxues
07/13/2021, 9:42 PM
I would suggest a DisposableEffect for this use case