How can I close an Ionic 5 app from code?

Viewed 3895

I can't find the way to close an app in Ionic 5 system. Looks like the way to do it in Ionic 4 is not working for Ionic 5. Is it possible to do?

1 Answers
closeApp() { 
    this.platform.backButton.subscribeWithPriority(999999, () => { 
    navigator['app'].exitApp();
    // or trigger any action you want to achieve
    }) //Amended missing a closing bracket
}
Related