Agasper / unity-android-notifications

Unity3D Plugin for Android local notifications with example project
Other
557 stars 184 forks source link

java.lang.SecurityException #93

Closed Faisalimrann closed 6 years ago

Faisalimrann commented 6 years ago

java.lang.RuntimeException: at android.app.ActivityThread.handleReceiver (ActivityThread.java:2520) at android.app.ActivityThread.access$1500 (ActivityThread.java:156) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1416) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:153) at android.app.ActivityThread.main (ActivityThread.java:5293) at java.lang.reflect.Method.invokeNative (Native Method) at java.lang.reflect.Method.invoke (Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:600) at dalvik.system.NativeStart.main (Native Method) Caused by: java.lang.SecurityException: at android.os.Parcel.readException (Parcel.java:1425) at android.os.Parcel.readException (Parcel.java:1379) at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag (INotificationManager.java:228) at android.app.NotificationManager.notify (NotificationManager.java:132) at android.app.NotificationManager.notify (NotificationManager.java:108) at net.agasper.unitynotification.UnityNotificationManager.onReceive (UnityNotificationManager.java:215) at android.app.ActivityThread.handleReceiver (ActivityThread.java:2513)

lot of crashes due to this security exception. any solution ?

Agasper commented 6 years ago

try to add <uses-permission android:name="android.permission.WAKE_LOCK" /> to the manifest