Event before exit the app
-
Is there any way to invoke event when user quits mobile app? Vue’s ‘beforeDestroy’ method doesn’t work here.
-
@kozyyy said in Event before exit the app:
Is there any way to invoke event when user quits mobile app? Vue’s ‘beforeDestroy’ method doesn’t work here.
Did you try the ‘pause’ and ‘resume’ events? When I click on the menu button the ‘pause’ event is fired as well as when switching to another app or the back button.
document.addEventListener("pause", (() => { console.log('pause'); }), false); document.addEventListener("resume", (() => { console.log('resume'); }), false);