You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Magnusja,
I think we should modify the place of registerReceiver in the source code, like the following example, so as to adapt to 33 and above. Or do you have any other way?
Process: com.example.intelligentstoragedemo, PID: 23330
java.lang.RuntimeException: Unable to get provider me.jahnen.libaums.storageprovider.UsbDocumentProvider: java.lang.SecurityException: com.example.intelligentstoragedemo: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.app.ActivityThread.installProvider(ActivityThread.java:8761)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:8240)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7882)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2640)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:328)
at android.app.ActivityThread.main(ActivityThread.java:9210)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
Caused by: java.lang.SecurityException: com.example.intelligentstoragedemo: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull(Parcel.java:3071)
at android.os.Parcel.createException(Parcel.java:3055)
at android.os.Parcel.readException(Parcel.java:3038)
at android.os.Parcel.readException(Parcel.java:2980)
at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6408)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1876)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1811)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1799)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
at me.jahnen.libaums.storageprovider.UsbDocumentProvider.onCreate(UsbDocumentProvider.java:283)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2697)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2667)
at android.provider.DocumentsProvider.attachInfo(DocumentsProvider.java:180)
at android.app.ActivityThread.installProvider(ActivityThread.java:8756)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:8240)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7882)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2640)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:328)
at android.app.ActivityThread.main(ActivityThread.java:9210)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
Code where problem occurs
In UsbDocumentProvider.java 283:9
context.registerReceiver(new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
UsbDevice device = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
discoverDevice(device);
}
}
}, new IntentFilter(ACTION_USB_PERMISSION));
The text was updated successfully, but these errors were encountered:
Problem
Hey Magnusja,
I think we should modify the place of registerReceiver in the source code, like the following example, so as to adapt to 33 and above. Or do you have any other way?
Stacktrace of Excpetion
Code where problem occurs
In UsbDocumentProvider.java 283:9
The text was updated successfully, but these errors were encountered: