2022-08-30 10:41:55.890 16148-16169/com.barcodetopc E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading nl.xservices.plugins.FileProvider uri content://com.barcodetopc.sharing.provider/root/storage/emulated/0/Android/data/com.barcodetopc/files/socialsharing-downloads/Scan_session_1.csv from pid=26069, uid=1000 requires the provider be exported, or grantUriPermission()
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:843)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:684)
at android.content.ContentProvider$Transport.query(ContentProvider.java:239)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106)
at android.os.Binder.execTransactInternal(Binder.java:1154)
at android.os.Binder.execTransact(Binder.java:1123)
2022-08-30 10:41:55.911 16148-16169/com.barcodetopc E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading nl.xservices.plugins.FileProvider uri content://com.barcodetopc.sharing.provider/root/storage/emulated/0/Android/data/com.barcodetopc/files/socialsharing-downloads/Scan_session_1.csv from pid=26069, uid=1000 requires the provider be exported, or grantUriPermission()
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:843)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:684)
at android.content.ContentProvider$Transport.query(ContentProvider.java:239)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106)
at android.os.Binder.execTransactInternal(Binder.java:1154)
at android.os.Binder.execTransact(Binder.java:1123)
2022-08-30 10:41:55.995 16148-16169/com.barcodetopc E/DatabaseUtils: Writing exception to parcel
java.lang.SecurityException: Permission Denial: reading nl.xservices.plugins.FileProvider uri content://com.barcodetopc.sharing.provider/root/storage/emulated/0/Android/data/com.barcodetopc/files/socialsharing-downloads/Scan_session_1.csv from pid=26069, uid=1000 requires the provider be exported, or grantUriPermission()
at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:843)
at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:684)
at android.content.ContentProvider$Transport.query(ContentProvider.java:239)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:106)
at android.os.Binder.execTransactInternal(Binder.java:1154)
at android.os.Binder.execTransact(Binder.java:1123)
And after that, the receiver application will present a toast with a file not found error, or file not support error.
Adding this to the SocialSharing.java file fixes the error, but still, the receiver applications fail to read the file and present the toast error:
I'm using the
share
method to share CSV files:this.socialSharing.share(null, this.scanSession.name, "data:text/csv;base64," + base64CSV, null);
It works fine on Android 8.1.0.
On Android 11 I get this error:
And after that, the receiver application will present a toast with a file not found error, or file not support error.
Adding this to the
SocialSharing.java
file fixes the error, but still, the receiver applications fail to read the file and present the toast error:This is my configuration: