Ionic app behaviour when pressing back button on android


Hi i find out, that when i use back button on android(the one whith the arrow), it minimalize ionic app, but when i want to reactivate it, it loads like it is newly opened. Can i somehow control this behaviour?



I think you are pushing your pages in the root like this.navCtrl.setRoot(your page) instead of that please use this.navCtrl.push(your page);



@Vartex05 If this is a Dev build do you find the same thing happens with a —Prod build?


yea it works like this even in prod version. i Found a workouraound with platform.registerBackButtonAction() and with Appminimize plugin. Now it only minimaze app.

Looks like in default it pop actual page and when u are already in root page, it practically closes the app.


We looked at the app minimise plugin too. Is that good practice? Isn’t that putting the app into background when the user thinks they have fully closed the app ?