Hello community,
I'm having trouble acquiring an image saved as a blob.
I am using a b4j app on desktop which acts as a server where a b4a app acquires data from the SqlLite database located on the local server.
I can successfully save the blob image on the db with the b4bj app.
Then I request through jobdone the image saved on the db, the problem is that the image I am going to save on the android device is 0kb.
This is the code:
I'm having trouble acquiring an image saved as a blob.
I am using a b4j app on desktop which acts as a server where a b4a app acquires data from the SqlLite database located on the local server.
I can successfully save the blob image on the db with the b4bj app.
Then I request through jobdone the image saved on the db, the problem is that the image I am going to save on the android device is 0kb.
This is the code:
CODE:
Sub JobDone(j As HttpJob)
If j.Success Then
If j.JobName = "send object" Then
Log(j.GetString)
Else If j.JobName = "send_Function " Then
Log(j.GetString)
Else If j.JobName ="Share_Icon" Then
Log("Icona: "&j.GetString)
Dim out As OutputStream = File.OpenOutput(File.DirDefaultExternal, "img.jpg", False)
Dim icon As Bitmap
File.Copy2(j.GetInputStream,out)
out.Close
End If
j.Release
ProgressDialogHide
End Sub