Releases: HBiSoft/PickiT
Fix issue #48
Seems like this happens when selecting a file with an unusual, but valid extension, like .JPG
instead of .jpg
or .jpeg
.
This is fixed by first checking if the file exists after it has been returned from Utils, if it's available it gets returned otherwise it will be copied to the temp folder.
Update demo application
Changed the demo application to have the option to select an image or a video.
Fix issue #44/#45
Implement #44
You can now check if the Uri
is from an unknown provider, like File Explorer
using isUnknownProvider(uri, APILevel);
Fix issue #41
This release mainly fixes issue #41, but also cleaned up the project and also updated the dependencies.
When selecting a file inside a sub-directory in the Downloads
directory, the Uri
on some devices return a content Uri
using an msf:
provider. In this case, it's not possible to "convert" the Uri
to a file path. The library uses /proc/
in this case. You can use the proc
path returned as you would with a file path.
I've also added the option to disable /proc/
if it's not working for some reason.
You can now also select multiple files.
Two improvements
Fixing issue when selecting a file from "Recent" or "Download" on Android 11.
Added context when deleting temp folder pickiT.deleteTemporaryFile(this);
Also, updated API's to the latest.
Add support for Dropbox's integrated file picker
SD Card path on different devices
Some devices didn't allow us to use the UID to access files for example /storage/6555-4521/video.mp4 - It will now first check if your device can access the file, if not it will attempt to get the "name" of your SD Card and return a path like this instead /storage/sdcard1/video.mp4
Added PickiTonUriReturned() callback
IMPORTANT:
When selecting a file from Google Drive, for example, the Uri will be returned in onActivityResult before the file is even available. We first have to wait for Google Drive to download the file before we try and use it. That is why PickiTonUriReturned() callback was added. Applications like Dropbox display a ProgressBar (indicating the progress) for us(inside the picker), but there are many applications like Google Drive and OneDrive which will return the Uri before it is even usable. Unfortunately, there is no way of knowing the progress of the file being downloaded - Thus we can only let the user know (inside PickiTonUriReturned) that we are waiting for the file to be downloaded (This can actually take very long depending on the file size).
You can test this, go to:
Google Drive - App Info - Storage - Clear data
Then open your app (or the demo app) and select a file from Google Drive.
Fix issue #14
The issue was that the file size was rounded to 0
, causing the crash.