How to keep the WakeLock for as long as an application is open/running?
<p>I need to keep a SCREEN_DIM_WAKE_LOCK for as long as my application is running. Before somebody lectures me on good or bad practice and how this messes with the device's own power management, this will be on a dedicated device and are the client's express wishes.</p>

<p>Most of the places where I see this only talk about using the WakeLock for a limited amount of time while you do something for example. I've tried to get the lock at the start of the application, but it is not working.</p>

<p>My questions are:<br>
- Where should I put it so that I can keep the lock for the duration of my application?<br>
- If the lock goes out of scope in a method does it stop working? <br>
- Should I be refreshing it or something ?<br></p>

<p>How would you go about achieving something like this ?</p>
