# Hardware Backbutton

**URL:** <https://forum.ionicframework.com/t/hardware-backbutton/129254>\
**Category:** ionic-v3\
**Created:** [April 29, 2018, 12:31pm UTC](https://forum.ionicframework.com/t/hardware-backbutton/129254 "2018-04-29T12:31:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmmud16](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@ahmmud16](https://forum.ionicframework.com/u/ahmmud16)\
**Post date:** [April 29, 2018, 12:31pm UTC](https://forum.ionicframework.com/t/hardware-backbutton/129254/1 "2018-04-29T12:31:27Z")

</div>

Hi, i have a TabControllerPage which contains 4 pages.

When im on tab2Root , tab3Root, tab4Root i want to handle that user always go back to tab1Root when click backButtonPress, and when click backpressbutton again from tab1Root, it will exit the app.

How can i do that?

I tried to implements this method:

platform.registerBackButtonAction(() =\> {  
navCtrl.push(tab1Root);  
});

in tab2Root constructor, but it just add a page over tab2Root, but i want to not get stacks, but always to back to tab1Root, and from there i want to exit the app.

---

<div class="post-metadata">

**Author:** ![Aivknowtech](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Aivknowtech](https://forum.ionicframework.com/u/Aivknowtech)\
**Post date:** [May 3, 2018, 6:37am UTC](https://forum.ionicframework.com/t/hardware-backbutton/129254/2 "2018-05-03T06:37:24Z")

</div>

I am also facing similar problem, hardware backbutton registering not working. not even getting in to the function. it directly closes the application. any solutions found ? I even tried setting priorities

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:38pm UTC](https://forum.ionicframework.com/t/hardware-backbutton/129254/3 "2021-07-19T21:38:19Z")

</div>


