Description
Apps using React Native targeting enableOnBackInvokedCallback might break if they use the code that references the unsupported APIs like KEYCODE_BACK and #onBackPressed). Therefore, we recommend migrating to OnBackPressedCallback to support the new back gesture experience and avoid any breakages.
Are there any plans to replace these APIs?
Context
Android 13 introduced the Predictive Back gesture, which enables users to visualize where they're going to land before completing a back swipe.
Version
0.68
Output of npx react-native info
N/A
Steps to reproduce
- EnableOnBackInvokedCallback=true in the AndroidManifest.xml of any given app
- Target AndroidSdk 33
- Use the back gesture in an app that uses unsupported APIS:
- OnBackPressed ReactActivity, ReactDelegate, ReactFragment, ReactActivityDelegate, ReactAppTestActivity, ReactInstanceManager
- KEYCODE_BACK ReactModalHostView
Snack, code example, screenshot, or link to a repository
The new APIs, docs, and samples are available from the above link. Please reply if you need more info.
Description
Apps using React Native targeting enableOnBackInvokedCallback might break if they use the code that references the unsupported APIs like KEYCODE_BACK and #onBackPressed). Therefore, we recommend migrating to OnBackPressedCallback to support the new back gesture experience and avoid any breakages.
Are there any plans to replace these APIs?
Context
Android 13 introduced the Predictive Back gesture, which enables users to visualize where they're going to land before completing a back swipe.
Version
0.68
Output of
npx react-native infoN/A
Steps to reproduce
Snack, code example, screenshot, or link to a repository
The new APIs, docs, and samples are available from the above link. Please reply if you need more info.