I want to set the wakelock time to the "unlimited" time or at least set the time to xx minutes / hours. If I try these code :
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "My Tag");
wl.acquire();
It just give me 30 seconds for the wakelock. But if I change my code to wl.acquire(10*60*1000L /10 minutes/);
as suggested from Android Studio, it didn't give any change to the wakelock time, any idea of it ?