I am new to Android programming, and I can't figure out how to request permissions only when the user wants to upload a file. Right now I request WRITE_EXTERNAL_STORAGE permission when the app loads, but I don't think this is ok.
I have tried to override the UIClient's openFileChooser method, to request the permission there, but I found that this is called after the "choose file" popup appears, and without permission no files are shown.
Hello,
I am new to Android programming, and I can't figure out how to request permissions only when the user wants to upload a file. Right now I request WRITE_EXTERNAL_STORAGE permission when the app loads, but I don't think this is ok.
I have tried to override the UIClient's openFileChooser method, to request the permission there, but I found that this is called after the "choose file" popup appears, and without permission no files are shown.
Do you know of a better solution?
Thanks.