Reputation: 588
I searched for a long time now and could not find any result.
I need an Event or a Method in Ionic 2 to check the stat of the Phone Display - Is the display locked or unlocked.
Another option would be to check if the user is active. But think the Lockscreen would be better.
Upvotes: 2
Views: 1917
Reputation: 858
Try with platform customization
constructor( private platform: Platform ) {
platform.ready().then(() => {
this.platform.pause.subscribe(() => {
console.log('[INFO] App paused');
});
this.platform.resume.subscribe(() => {
console.log('[INFO] App resumed');
});
});
}
Upvotes: 1