Category : wakelock

My app has 3 activities; MainActivity has a large ImgeView with a jpg picture in main layout. Activities are changed with this code: Intent i = new Intent(this, Activity1.class); startActivityForResult(i,70);// arbitrary and back to MainActivity with code: protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case 70: // ..

Read more

I have started a foreground service from my application to take the user’s location every 5 minutes. It’s working fine until the device went to the doze mode. To overcome the above issue I follow the below approaches. The foreground service has acquired a partial wake lock to keep the CPU awake The application is ..

Read more

I am working with AOSP-Q i.e developing custom ROM. According to my understanding, after device is booted, if i write any value to /sys/power/wake_lock(ex: echo MY_WAKELOCK > /sys/power/wake_lock) then device shouldn’t suspend after screen timeout. This suspend is partial means only cpu will wakeup and other userspace functions should be suspended. But in my case ..

Read more