R RMarra Member Licensed User Longtime User Sep 23, 2019 #1 I've been writing my data to File.DirInternal (mainly because that's the only option that doesn't give me an error about permissions). I want to show the files in the FilePicker, but I get an error that says Application needs you permission to access SD card Click to expand... I've been reading and writing to DirInternal this whole time under the assumption that it was NOT the SD card. Am I doing something wrong, or is FilePicker (1.01) not the right choice?
I've been writing my data to File.DirInternal (mainly because that's the only option that doesn't give me an error about permissions). I want to show the files in the FilePicker, but I get an error that says Application needs you permission to access SD card Click to expand... I've been reading and writing to DirInternal this whole time under the assumption that it was NOT the SD card. Am I doing something wrong, or is FilePicker (1.01) not the right choice?
mcqueccu Expert Licensed User Longtime User Sep 23, 2019 #2 Read on Runtime permissions https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/ Upvote 0
Read on Runtime permissions https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/
Semen Matusovskiy Well-Known Member Licensed User Sep 23, 2019 #3 If you want to restrict a choice by File.DirInternal, you don't need to use FilePicker, ContentChooser etc. Retrieve a list of files using File.ListFiles and make a form from ListView and Button. Upvote 0
If you want to restrict a choice by File.DirInternal, you don't need to use FilePicker, ContentChooser etc. Retrieve a list of files using File.ListFiles and make a form from ListView and Button.
R RMarra Member Licensed User Longtime User Sep 23, 2019 #4 I'm not understanding why the FilePicker is having permission issues when I'm reading and writing to that directory just fine. Upvote 0
I'm not understanding why the FilePicker is having permission issues when I'm reading and writing to that directory just fine.
Erel B4X founder Staff member Licensed User Longtime User Sep 24, 2019 #5 What do you mean with FilePicker? There are all kinds of classes named FilePicker. I guess that the one you are using tries to list File.DirRootExternal which requires a permission. Upvote 0
What do you mean with FilePicker? There are all kinds of classes named FilePicker. I guess that the one you are using tries to list File.DirRootExternal which requires a permission.
R RMarra Member Licensed User Longtime User Sep 24, 2019 #6 I tried the one at https://www.b4x.com/android/forum/threads/filepicker.69161 Is there a different class you would recommend? Upvote 0
I tried the one at https://www.b4x.com/android/forum/threads/filepicker.69161 Is there a different class you would recommend?
Erel B4X founder Staff member Licensed User Longtime User Sep 24, 2019 #7 Are you setting the root parameter to File.DirInternal? Can you post the full error message (right click to copy)? Upvote 0
Are you setting the root parameter to File.DirInternal? Can you post the full error message (right click to copy)?
Semen Matusovskiy Well-Known Member Licensed User Sep 24, 2019 #8 As I understand, ContentChooser and github's libraries use ACTION_GET_CONTENT https://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT As I read, ACTION_GET_CONTEXT can't be limited by specified directory. Or I am wrong ? Upvote 0
As I understand, ContentChooser and github's libraries use ACTION_GET_CONTENT https://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT As I read, ACTION_GET_CONTEXT can't be limited by specified directory. Or I am wrong ?