Why is my application asking for the "prohibit the phone from sleeping" permission?

When I install my application, it asks for this permission:

prevent sleeping phone

I assume this comes from WAKE_LOCK permission, but my application does not indicate this. Here is a list of permissions from my manifest:

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> 

I contact ACRA and Google Analytics, but I don’t see how I can get permission from them.

UPDATE: here is my build.gradle for my main module. it includes google play analytics:

 dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' compile project(':acra-4.7.0') compile 'com.google.android.gms:play-services-analytics:8.4.0' } apply plugin: 'com.google.gms.google-services' 

UPDATE: As suggested by CommonsWare, it has discovered the culprit in the manifest:

 ADDED from [com.google.android.gms:play-services-basement:8.4.0] C:\Users\Bill\Workspace\NetworkExplorer\app\build\intermediates\exploded- aar\com.google.android.gms\play-services-basement\ 8.4.0\AndroidManifest.xml:23:13-66 uses-permission#android.permission.WAKE_LOCK 

It seems like I don't need WAKE_LOCK for simple Google Analytics reports.

+7
android manifest
source share
1 answer
 <uses-permission android:name="android.permission.WAKE_LOCK" tools:node="remove" /> 

he will do the job.

Hope this helps.

+2
source share

All Articles