3

I updated to Capacitor 3.0.1 with angular, but everytime I press hardware back button it closes the entire app... I expect the older behavior, close push page, etc. what can I do?

jespinosar
  • 39
  • 2
  • Does this answer your question? [Ionic Capacitor hardware back button is automatically closing the app](https://stackoverflow.com/questions/67766576/ionic-capacitor-hardware-back-button-is-automatically-closing-the-app) – Hadrien01 Oct 06 '21 at 08:23

1 Answers1

3

Install @capacitor/app plugin

https://capacitorjs.com/docs/apis/app

I recommend reading the upgrade guide, it’s mentioned there https://capacitorjs.com/docs/updating/3-0

jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
  • An important step from the guide: don't forget to clean your MainActivity.java. Capacitor 3 uses its own onCreate method that takes care of the back button. – Hadrien01 Oct 06 '21 at 08:23