Android Question Error with external storage

Giusy

Active Member
Licensed User
Hi,
I copied these instructions from the forums
B4X:
Dim extFolder As ExternalFile = Storage.FindFile(Storage.Root, folder)
Log("Folder found: " & extFolder.IsInitialized)
If extFolder.IsInitialized Then
   Dim extFile As ExternalFile = Storage.FindFile(extFolder, filename)
   Log("File found: " & extFile.IsInitialized)
   If extFile.IsInitialized Then
       Dim rp As RuntimePermissions
       Dim out As OutputStream = File.OpenOutput(rp.GetSafeDirDefaultExternal(""), filename, False)
       File.Copy2(Storage.OpenInputStream(extFile), out)
       out.Close
   End If
End If
But I have mistakes, what did I forget?
Thanks
 

Attachments

  • ERRORE.PNG
    ERRORE.PNG
    9.1 KB · Views: 195

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top