Reputation: 83
What happens if a external library only accept a java.io.File ore a filepath on Android 10? Are all external libraries which didn't use DocumentFile or handle a Uri with the media store, unusable?
For example: I like to use this library on Android 10 and above: https://github.com/ericfarng/jid3lib
But this library only handles java.io.File or filepath. Which options did i have to use it in the future?
I think there are many apps which gets unusable after the changes from Google. Is that right or is there an option for every scenario to maintain the current functions?
Upvotes: 1
Views: 725
Reputation: 1007474
What happens if a external library only accept a java.io.File ore a filepath on Android 10? Are all external libraries which didn't use DocumentFile or handle a Uri with the media store, unusable?
You can always make a copy of the content to a file that you control (e.g., in getCacheDir()
), then use the library with that copy.
Also, on Android R (at least through DP3), "raw paths" basically means READ_EXTERNAL_STORAGE
works again for accessing external storage. So, you may only need to worry about this make-a-copy issue for Android 10.
For example: I like to use this library on Android 10 and above: https://github.com/ericfarng/jid3lib
But this library only handles java.io.File or filepath. Which options did i have to use it in the future?
Since this library is open source, you have the option of making your own copy of the library that can operate off of an InputStream
. That particular library will be somewhat difficult to modify, as it relies upon RandomAccessFile
.
Upvotes: 1