Mobile-Artificial-Intelligence/maid

Loading any file required permissions to be given in the application settings manually.

liljohnak opened this issue · 4 comments

Suggested change: https://stackoverflow.com/questions/50561737/getting-permission-to-the-external-storage-file-provider-plugin
Path: android/app/src/main/AndroidManifest.xml (Looks good)
Issue: I needed to give permissions in the application settings to read files.
Can you double check the permissions are being asked for at runTime using permission_handler?
Secondly, do you want to add an error message here?: lib/classes/llama_cpp_model.dart

what version of android are you on? File permissions should be just handled by FilePicker but if they're not it could be an incompatibility between android versions maybe. I'm on android 14.

@danemadsen Android 12. Will re-install and verify and give back steps if I can reproduce this behavior.

@danemadsen ok found steps. Evaluate if this is user error.

  1. Install
  2. Model settings> Load model
  3. Storage permissions prompt> Click deny
  4. Repeat steps 2 and 3
  5. Repeat step 2
    Note: no prompt.
    Note2: works if I click allow on step 3.

@liljohnak Yeah that's expected behavior. You have to accept the storage permissions or it wont work. Re-requesting permissions is not the current behavior of the file_picker package. This is an upstream issue that needs to be fixed / changed in the file_picker repo:

https://github.com/miguelpruivo/flutter_file_picker