This commit is contained in:
Peter Maquiran
2022-01-29 19:21:46 +01:00
parent bf0dbf8baf
commit ed77e1aea7
14 changed files with 402 additions and 19 deletions
@@ -0,0 +1,25 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class AppProcessStatusService {
status: 'resume' | 'pause' = 'resume'
constructor() {
this.events()
}
private events() {
document.addEventListener('pause', () => {
// console.log('App going to background');
this.status = 'pause'
});
document.addEventListener('resume', () => {
// console.log('App going to background');
this.status = 'resume'
});
}
}