yasirkula / UnityNativeFilePicker

A native Unity plugin to import/export files from/to various document providers on Android & iOS
MIT License
284 stars 32 forks source link

Cannot select freshly downloaded file from "Downloads". Huawei nova 3i. #21

Open tn7111 opened 2 years ago

tn7111 commented 2 years ago
  1. Download some file
  2. Open the file picker from your application
  3. Go to quick folder "Downloads"
  4. The downloaded file is grey and cannot be selected.
  5. Find the same file going through local storage to Downloads folder.
  6. The file can be selected.
  7. Rename file from the file explorer on the device
  8. Go back to your application
  9. Go to quick folder "Downloads"
  10. File can be selected
  11. Rename back to original name
  12. Cannot be selected.

Could not reproduce the issue for Samsung s10+ though. I understand this is something specific about Huawei storing the files, but maybe you've got idea how to deal with it? If some percent of my users will face this issue, I'll have to instruct them with this clumsy workaround which is not really desirable.

Thanks in advance.

yasirkula commented 2 years ago

Thank you for the detailed instructions. Unless the file's extension changes when you rename it, I honestly have no idea why this issue is occurring. At the moment, I don't know how we can resolve this weird issue, unfortunately.

P.S. The file picker user interface is created by the Android OS, I'm not creating it manually. Thus, I don't have any specific code to investigate (like some sort of file explorer code), such code doesn't exist in this plugin. Googling the issue didn't yield any results for me either.

Yiming075 commented 2 years ago

I notice that on Android when picking on the file browser tab it can show the correct extension, but when picking files from "Google Drive" and the "Downloads" tab, it returns the path with .bin extension. Not sure if that is the cause of the problem. pick_all_file_2_new

yasirkula commented 2 years ago

.bin may be observed when the file's name that is reported by ContentResolver doesn't have an extension and its MIME type returns application/octet-stream. I can't comment on whether or not this is related to the original issue at the moment.