Dionatan Moretti
New Member
Hi.
I've looked for a lot and found some solutions. But I don't know where i'm missing...
I need to take a photo using camera and send the captured image using ftp... B4A ok, it's worked fine... but doesn't work in B4I.
The code that i'm using is:
I've looked for a lot and found some solutions. But I don't know where i'm missing...
I need to take a photo using camera and send the captured image using ftp... B4A ok, it's worked fine... but doesn't work in B4I.
The code that i'm using is:
B4X:
Sub camera1_Complete (Success As Boolean, Image As Bitmap, VideoPath As String)
If Success Then
If Image.IsInitialized Then
Dim p As Phone
Dim out As OutputStream = File.OpenOutput(File.DirDocuments,"test2.png",True)
Image.WriteToStream(out, 100, "PNG")
p.AddImageToAlbum(Image)
out.Close
Dim FTP As FTP
FTP.Initialize("FTP", "fpt.server.test", 21, "user", "pwd")
FTP.UploadFile(File.DirDocuments,"test2.png",False,"/gx5.PNG")
End If
End If