registerBackButtonAction doesn't work

registerBackButtonAction doesn’t work.
I executed the following code, but when I press the hardware back button, nothing is displayed in the log.
What should I do?

import { Platform } from 'ionic-angular';

  templateUrl: 'app.html'
export class MyApp {
  rootPage = TabsPage;

  constructor(platform: Platform) {
    platform.registerBackButtonAction(() => {

          console.log("Backbutton pressed.");

      }, 100);

1 Like

Wrap that in
this.platform.ready().then(() => )

Thank you for reply.

I tried it but doesn’t work.

For me also this dont work with ionic Pro, any updates ?