I’m using Ionic 5.
I would like to hide the app content (e.g. make the app content blank or splashscreen) on the app switcher to protect privacy.
I tried this:
this.platform.ready().then(
() => {
this.platform.pause.subscribe(
() => {
this.splashScreen.show();
}
);
this.platform.resume.subscribe(
() => {
this.splashScreen.hide();
}
);
}
);
But nothing gonna happen because the pause event is triggered too late. What should be the solution for this purpose? Thank you.