Is there any callback that the app has been paused in Android Q? I'd like to do some actions with the app in such a case, but I can't find any descriptions of it.
"Pause app" is a new feature of Android Q: https://9to5google.com/2019/05/21/digital-wellbeing-pixel-launch-pause-app/
It's not onPause() lifecycle method.
For other users downvoting his question - this is about a feature in Google's Digital Wellbeing program which has been pushed to Pixel phones - not about the activity lifecycle
For OP - I don't think you will get a satisfactory answer to this yet. I have looked through the Android Q Beta documentation and they are not offering links to anything specific. However for developers in the future, I think the term to search for is "distraction state" as mentioned in their docs:
Per-app distraction state -- Android Q can now selectively set apps to a "distraction state" where their notifications are suppressed and they will not appear as suggested apps.
For now the only thing I can suggest is to not target android Q in gradle. So today the correct answer is this information / api has not been made public yet
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With