How to give a wakelock to an app? How can I give a CPU wakelock to an app so that It can work even when the screen is off?

(Usually android halts CPU too, when screen is off)
If you don't have root access in your phone, there are many apps in the Play Store which can take a partial wake lock. Just start the app manually when you need it. Because, if one app takes a partial wake lock, other apps can also take the advantage.