Hardware Back Button Not Working on Android

I have read through the documentation and it says that out of the box Ionic supports the android hardware back button. That it will pop off the stack etc.

My application is angualr 12.2.4 with ionic/angular 5.8.1 and capacitor/core 3.2.3 Originally the back button on android would just close the application. After reading some I saw that the back button was handled with capacitor/app so I have installed 1.1.1. This now prevents the back button from closing the application, however, nothing happens now.

Reading the Ionic docs about the hardware back button i tried to use the Basic Usage by adding the following to my app.component.ts

constructor(private platform: Platform) {
  this.platform.backButton.subscribeWithPriority(10, () => {
    console.log('Handler was called!');
  });
}

however, the console log was never called. I saw a recommendation to use the following

App.addListener('backButton', () => {

      console.log('back button pressed');

      console.log(this.location.path());

      this.location.back();

    });

and this console log is being called. Next issue i have is that nothing is happening. Modules are not popping. Its there something i need to do in order to activate this functionality?