Application permissions

mobrules

Well-known member
Jan 21, 2011
1,170
0
0
Visit site
I'm hoping someone can help.
I bought the Razr Maxx HD and set it up as close to my droid 4 as possible. Same settings and same apps from the market. I noticed after a day there was something called "wakelock" draining the battery quickly. I started deleting some apps and that did not work, wakelock would not go away and shut off. I ended up resetting the phone and it went away.
Since then I have started to download some of the apps again but have really started to read the app permissions. I have noticed in several of them it states the app "prevents the phone from sleeping" and some actually use the work "wakelock". I guess I'm looking for some kind of difference between the two. If the permission says it prevents the phone from sleeping is that just while the app is being used?
Thank you for any advice. I appreciate the help.
 

DanPLC

Well-known member
May 25, 2011
186
7
0
Visit site
Apps that use the WAKE_LOCK permission don't necessarily drain the battery, but apps that misuse it will. Certain apps require this permission to operate properly. For instance the music app I'm beta testing now requires it to ensure the app can continue to playback music without interruption. So while music is playing, it uses a "partial wake lock" which allows the CPU to keep running even if the device's display is powered off. Otherwise, music would stop playing once the device went to sleep.

Apps that use WAKE_LOCK need to be very careful to only acquire a wake lock for the shortest amount of time necessary and to release it immediately when it's no longer required. Also they should use partial wake locks instead of full wake locks if possible.

So basically if you're using an app that would have a legitimate reason to run in the background (like a music app), you shouldn't be worried about the WAKE_LOCK permission (assuming the developer is using it properly). But if an app doesn't seem like it has a legitimate reason to use it, it may be a good idea to not use the app, or at least ask the developer why they're using that permission.

When I release my app in the Play Store I plan on having a section at the bottom of the app description describing what each permission is used for. I really wish Google would have a built-in way for developers to add notes to each requested permission. I get nervous when I see an app asking for a weird permission (like sending SMS's, etc.), so it would be nice if developers specified why they needed the permission.
 
Last edited:

Forum statistics

Threads
942,989
Messages
6,916,763
Members
3,158,762
Latest member
trudycharles