Question

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)

Was it helpful?

Solution

for Wakelock permission in your android manifest file use

<uses-permission android:name="android.permission.WAKE_LOCK" />

OTHER TIPS

A wake lock is a mechanism to indicate that your application needs to have the device stay on.

If you want to keep the screen on you required this permission.

<uses-permission android:name="android.permission.WAKE_LOCK" />

Call acquire() to acquire the wake lock and force the device to stay on at the level that was requested when the wake lock was created.

Call release() when you are done and don't need the lock anymore. It is very important to do this as soon as possible to avoid running down the device's battery excessively.

Fore more click Doc

put all the uses-permission at the end of the manifest

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top