This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android 4.1 and AppOpsManager #495
Comments
@jtroxel Yeah, that's a bug. We can fix it pretty quickly though. |
yes, this seems off for < 4.4. i can fix this by thursday with using @fredgalvao's suggestion using reflections. |
@zwacky kk, I'll let you handle it. |
here we go, tested it on 4.4+ and 4.2. 1557f73 |
This thread has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am wondering if the support for Android 4.0 and above is accurate. We have push notifications working on several devices 4.4 and above, but on a 4.1 device we see the following, followed by a crash of the app:
E/AndroidRuntime(17781): FATAL EXCEPTION: pool-1-thread-2
E/AndroidRuntime(17781): java.lang.NoClassDefFoundError: android.app.AppOpsManager
E/AndroidRuntime(17781): at com.adobe.phonegap.push.PermissionUtils.hasPermission(PermissionUtils.java:17)
E/AndroidRuntime(17781): at com.adobe.phonegap.push.PushPlugin$3.run(PushPlugin.java:171)
E/AndroidRuntime(17781): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
E/AndroidRuntime(17781): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
E/AndroidRuntime(17781): at java.lang.Thread.run(Thread.java:856)
A little digging, looks like AppOpsManager is only available on sdk19 / 4.4+: http://developer.android.com/reference/android/app/AppOpsManager.html
If we are doing something wrong, we'd love to know, or otherwise if there is a workaround for this. Thanks.
The text was updated successfully, but these errors were encountered: