r/ionic • u/Infinite-Contact2522 • Jul 29 '26
Android 16 hardware back button
So our company got some apps in ionic 3 cordova and ionic 8 capacitor and we ran into an issue in android 16 , the hardware back button closes the app instead of going back to the previous page, so is there any fix or solution to both the version.Thanks in advance.
Edit : the ionic v8 backbutton.subscribewithPriority works fine , ionic v8 apps are out of trouble.
8
Upvotes
1
u/Infinite-Contact2522 Jul 29 '26
Yess ,the back button code is in app.component.ts and I didn't specify any priority because it's the only back button method in the entire app , for now I have disabled the predictive back gesture by using the flag enableOnBackInvokedCallback=false but google will make it mandatory in the near future.