fishwjy / MultiType-FilePicker

This is a light Android file picker library.
Apache License 2.0
1.4k stars 248 forks source link

Not working in android 11 #76

Closed nilsinojiya1 closed 2 years ago

nilsinojiya1 commented 3 years ago

Normal file picker not working in android 11 because of file access restrictions. Pls help.

adilomatom commented 2 years ago

Normal file picker not working in android 11 because of file access restrictions. Pls, help.

Any Body Find Solution

nilsinojiya1 commented 2 years ago

Normal file picker not working in android 11 because of file access restrictions. Pls, help.

Any Body Find Solution

Hello, Because of the file restrictions in Android 11 we not able to use any file picker library. The suggested solution from my side is, use default file manager to get uri of that any file which you want to access in your app, then using that URI create copy of that file in your app scope storage. Then its easy to access that file from app scope storage.

Thanks & regards make the internet a better place🙂

adilomatom commented 2 years ago

Normal file picker not working in android 11 because of file access restrictions. Pls, help.

Any Body Find Solution

Hello, Because of the file restrictions in Android 11 we not able to use any file picker library. The suggested solution from my side is, use default file manager to get uri of that any file which you want to access in your app, then using that URI create copy of that file in your app scope storage. Then its easy to access that file from app scope storage.

Thanks & regards make the internet a better place🙂

Thanks for Sugesstion this work is already done but the problem is when we need multi-file selection for editing any idea please share

nilsinojiya1 commented 2 years ago

@adilomatom You can use registerForActivityResult(ActivityResultContracts.GetMultipleContents()) instant of registerForActivityResult(ActivityResultContracts.GetContent()

adilomatom commented 2 years ago

@adilomatom You can use registerForActivityResult(ActivityResultContracts.GetMultipleContents()) instant of registerForActivityResult(ActivityResultContracts.GetContent()

thanks