Konubinix' opinionated web of thoughts

Wakelock

Fleeting

find out the wakelocks with

adb shell dumpsys power|grep -i wake_lock

{
    wakelock: null,
    start() {
        navigator.wakeLock.request("screen").then(
            (w) => {
                this.wakelock = w;
                // alert("acquired")
            }
        ).catch((err) => {
            alert(`${err.name}, ${err.message}`);
        });
    },
    stop() {
        if (this.wakelock != null) {
            this.wakelock.release().then(() => {
                this.wakelock = null;
                // alert("released");
            }).catch((err) => {
                alert(`${err.name}, ${err.message}`);
            });
        }
    }
}

Notes linking here