I wonder if the new `NavigationEventDispatcher` is...
# android
a
I wonder if the new
NavigationEventDispatcher
is a successor to
OnBackPressedDispatcher
?
not kotlin but kotlin colored 4
c
Image from iOS.jpg
a
It's a Kotlin (Multiplatform) API to build (not only) Android apps using the Kotlin programming language.
c
Then you should move the question to #C3PQML5NU
i
Did you get a chance to read the release notes? It called this out explicitly: https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0-alpha01
• The androidx.navigationevent library provides a KMP-first API for handling system back as well as Predictive Back. The NavigationEventDispatcher serves as a common APIs for registering one or more NavigationEventCallback instances for receiving system back events.
• This layer sits below the previously released APIs in androidx.activity and aims to be a less opinionated replacement for using the Activity APIs in higher level components or directly using the Android framework OnBackInvokedDispatcher APIs. The androidx.activity APIs have been rewritten on top of the Navigation Event APIs as part of Activity 1.12.0-alpha01.
a
Thanks for the link, it makes it clear now. I read through the docs on NavigationEventDispatcher as well as NavigationEventDispatcherOwner but there was no info there. I also googled a lot without success and searched through this Slack workspace. I used to use the documentation as the primary source of information.