Skip to content

Conversation

@shrastiRisor
Copy link

No description provided.

@jeziellago
Copy link

Duplicated. #149

@shrastiRisor
Copy link
Author

@jeziellago #149 has been closed. Could you please review this one?

@hikkidev
Copy link

hikkidev commented Sep 29, 2020

It is required to add a check for an existing file, if it was created by your app locally and is not registered with resolver.
(Got NPE cursor is null)

fun getFileName(context: Context, uri: Uri): String { uri.path?.let { val file = File(it) if (file.exists()) return file.name } val resolver = context.contentResolver val cursor = resolver.query(...)
@extorn
Copy link

extorn commented Jan 6, 2021

Perhaps the code that I posted can be used to resolve the issues here and get it working. I use my code to compress any files on Android 10. #163 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants