Wish [CLOSED] DirRootExternal2

Roger Daley

Well-Known Member
Licensed User
Longtime User
After having read many posts/tutorials/links etc. I am increasingly confused and frustrated by the imminent restrictions on apps/users accessing the same "External Memory".
1. Firstly I accept that it is probably me.
2. My aim is to access [read/write] to the "Pseudo External Memory" NOT SD Cards or USB drives.
3. In reading through the multitude of posts, responses and tutorials I find it is a never ending battle to determine if the subject under discussion is "External Memory" or "Internal Memory" that the Google Geeks in their wisdom have labelled "External Memory". [Pseudo External Memory].
4. Likewise in my reading I am frequently at a loss to determine if it is what the rules were, what the rules are today or what the rules are thought to be come 5th may 2021. To compound this confusion there are a multitude of sub clauses dependent on the target SDK.

My Wish:
A new B4A command: DirRotexternal2.
To access DirRootExternal using DirRootExternal2 command in itself would be "Requesting Permission". The command DirRootExternal2 would examine what permissions are required and request them appropriately.


Regards Roger
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

Xfood

Expert
Licensed User
to save it's ok,
could you add an example to read a file from android app in External folder?
Thank you
 

LucaMs

Expert
Licensed User
Longtime User
B4X:
Private Sub Button1_Click
    Dim cc As ContentChooser
    cc.Initialize("cc")
    cc.Show("image/*", "Choose image")
    Wait For CC_Result (Success As Boolean, Dir As String, FileName As String)
    If Success Then
        Dim bmp As B4XBitmap = xui.LoadBitmap(Dir, FileName)
        Log(bmp)
    End If
End Sub
Strange, it is almost identical to the one in my lmPWsManager ?

1619950565005.png
 
Top