In my Jetpack Compose project I'm using BackPressH...
# compose
v
In my Jetpack Compose project I'm using BackPressHandler from Android examples. Everything works as expected until I pause and resume the app. At this point BackPressHandler is not intercepting back button anymore and navigation just defaults to regular back press behaviour. Gist example: https://gist.github.com/vitalnik/2a444c20cb9f370c405ee1ddb86d3e66
i
Use the official API for handling the back button - it handles this case (and many others) correctly: https://developer.android.com/reference/kotlin/androidx/activity/compose/package-summary#backhandler
v
Thanks, the official one works great!
K 1