If so, can I block all third-party app wakelocks since I want the apps to run only when my screen is on?
I understand that this would break some functionality like receiving whatsapp messages when screen is off, but I am fine with it.
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
Are wakelocks only when screen is off?
Quoting from Android Developers
A wake lock is a mechanism to indicate that your application needs to have the device stay on
The following wake lock levels are defined, with varying effects on system power. These levels are mutually exclusive - you may only specify one of them.
I want the apps to run only when my screen is on?
For further reading: Wakelocks: Detect No-Sleep Issues in Android* Applications