I have choose 2 time the json file to raise event
My event sub
B4X:
public Sub boiteDialog_Result (Success As Boolean, Dir As String, FileName As String)
Log(Success & " - " & Dir & " - " & FileName)
Bornes_fontaines(Dir, FileName)
I use this to open a json file
B4X:
Public Sub Bornes_fontaines(dossier As String, nomfichier As String)
Dim json As String
json = File.ReadString(dossier, nomfichier)
' Log (json)
Dim parser As JSONParser
parser.Initialize(json)
my contentchooser is different from yours. when the result event is fired, i see:
true - ContentDir - content://com.android.externalstorage.documents/document/primary%3ADownload%2Ffleury.json
and i can open the file, no problem.
this is not what you see... your uri is different, although my uri and yours might point to the same place. i'm using sdk30 on android 12
public Sub boiteDialog_Result (Success As Boolean, Dir As String, FileName As String)
Log(Success & " - " & Dir & " - " & FileName)
'Bornes_fontaines(Dir, FileName)
Dim texte As String
texte= File.ReadString(Dir, FileName)
Log(texte)