In Android 8+ google change the content provider (it is no Long anymore, it is a string with "raw:"-prefix), your library is throwing an NumberFormatException...
The selected Uri looks like this:
content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2FCloudstationPrivate%2FTransfer%2Fimg.jpg
I fixed this by adding this to Util.getFileFromUri():
final String docId = DocumentsContract.getDocumentId(uri);
// Fix for OREO:
if (docId.startsWith("raw:")) {
filePath = docId.replaceFirst("raw:", "");
} else if (isExternalStorageDocument(uri)) {...
In Android 8+ google change the content provider (it is no Long anymore, it is a string with "raw:"-prefix), your library is throwing an NumberFormatException...
The selected Uri looks like this:
content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2FCloudstationPrivate%2FTransfer%2Fimg.jpg
I fixed this by adding this to Util.getFileFromUri():