iOS Question Copy Image

fishwolf

Well-Known Member
Licensed User
Longtime User
Can i copy image into picture folder as with b4a?

B4X:
Dim DestinationPath As String

   DestinationPath = File.Combine(File.DirRootExternal, "Pictures/myapp")
   
   If File.Exists(DestinationPath, "") == False Then
     File.MakeDir(File.Combine(File.DirRootExternal, "Pictures"), "myapp")
   End If
   
   File.Copy(File.DirInternalCache, SourceFile, File.Combine(File.DirRootExternal, "Pictures/myapp"), DestinationFile)

   ToastMessageShow("file download", True)
   
   
   
Dim MyIntent As Intent
Dim MyPhone As Phone

   MyIntent.Initialize("android.intent.action.MEDIA_SCANNER_SCAN_FILE", "file://" & File.Combine(File.DirRootExternal, "Pictures/myapp/" & DestinationFile))
   
   MyPhone.SendBroadcastIntent(MyIntent)
 
Top