Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to Notifications need WAKE_LOCK in android?

how to remove this error during download image and when Updating Notification.

java.lang.SecurityException: Neither user 10080 nor current process has android.permission.WAKE_LOCK. at android.os.Parcel.readException(Parcel.java:1425) at android.os.Parcel.readException(Parcel.java:1379) at android.os.IPowerManager$Stub$Proxy.acquireWakeLock(IPowerManager.java:326) at android.os.PowerManager$WakeLock.acquireLocked(PowerManager.java:309) at android.os.PowerManager$WakeLock.acquire(PowerManager.java:300) at android.app.NotificationManager.notify(NotificationManager.java:128) at android.app.NotificationManager.notify(NotificationManager.java:104)

like image 857
AnilPatel Avatar asked Feb 10 '14 11:02

AnilPatel


1 Answers

for Wakelock permission in your android manifest file use

<uses-permission android:name="android.permission.WAKE_LOCK" />
like image 51
Harshad Ranganathan Avatar answered Sep 29 '22 17:09

Harshad Ranganathan