Why this component?From Android 16 on, apps that target API 36 no longer receive onBackPressed() or the KEYCODE_BACK key event. Predictive back is on by default. Older back button components rely on that event, so on Android 16 devices (for example a Samsung Galaxy S24 Ultra on One UI 8) your custom back logic, such as an exit confirmation, stops working without any error.
onBackPressed()
KEYCODE_BACK
This component uses only Android’s supported API, AndroidX OnBackPressedDispatcher with OnBackPressedCallback. That is the same mechanism Cordova Android 15.1 and Capacitor use. It works on Android 7 through Android 16 and later, with both gesture and 3-button navigation.
OnBackPressedDispatcher
OnBackPressedCallback
Features
BackButtonHandler
TriggerDefaultBack
ShowExitConfirmation = True
Enabled
ShowExitConfirmation
DisableBackHandling
EnableBackHandling
GetBackButtonStatus
CheckBackButtonPlugin