android - Detect Screen Off / On in Cordova and Ionic -


i want detect when phone locked , unlocked.

the plan display (non-ad) popup when phone unlocked. far cordova seems support pause , resume events not me functionality need.

native android supports screen on/off , user present events. possible use these events , if not possible build plugin gain same functionality?

thanks in advance.

for android have use plugin template create background service can listen events:

https://github.com/red-folder/bgs-sample

on ios there plugin implements functionality if deploy on ios:

https://github.com/ttatarinov/lock-screen-logger-phonegap-plugin


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -