WakeLock wl_cpu = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyCpuLock");
wl_cpu.acquire(8000);
wl_cpu.release();
Good day everyone! I have simple question here. I am using the above code as my wake lock in case user receive notification, and the question is am I releasing the wakelock properly? I just release the wake lock right after calling wl_cpu.acquire()?
In case there is a better place where to call wl_cpu.release(), please let me know. Thanks in advance.