Ionic 4 Hardware Back Button not working

I am pressing Hardware back button but not working, Please give me anyone complete solution

Please try this cod. it’s works for me

this.platform.ready().then(() => {
    this.backButtonSubscription = this.platform.backButton.subscribe(() => {
        // code that is executed when the user pressed the back button

i also using same but it’s not working