Home > Software design >  Does we need to hold wake lock programmatically for work manager or work manager do it by itself?
Does we need to hold wake lock programmatically for work manager or work manager do it by itself?

Time:10-04

I am new to work manager and I want to know that if we use OneTimeWorkManager so does we need to hold wake lock programmatically or work manager did it by itself. Please guide me

Thanks in advance

CodePudding user response:

WorkManager does not need wake lock to work.

Always works in background without wake lock

CodePudding user response:

Using WorkManager adds the Wakelock permission to your AndroidManifest.xml as the library will use it as needed.

You can use the Background Task Inspector to see the active wakelocks.

Please refer to WorkManager's source code for additional information.

  • Related