Sorry, but hit another brick wall.
Using the Camera Demo which is great. Trying to store the Data Byte Array that is passed to the Camera1_PictureTaken sub and post this to a web page (which then stores it in a database).
Getting java.lang.NullPointerException when the PostBytes is called: -
This is then caught with: -
I have had a look around the site, but cannot find any advice on this one...
Using the Camera Demo which is great. Trying to store the Data Byte Array that is passed to the Camera1_PictureTaken sub and post this to a web page (which then stores it in a database).
Getting java.lang.NullPointerException when the PostBytes is called: -
B4X:
Sub Camera1_PictureTaken (Data() As Byte)
Dim SaveJob As HttpJob
SaveJob.Initialize("SaveImage",Me)
SaveJob.PostBytes("http://10.0.1.9/CareControl/ccSaveImage.aspx?ImageID=1",Data)
camEx.StartPreview 'restart preview
End Sub
This is then caught with: -
B4X:
Sub JobDone (Job As HttpJob)
If Job.Success Then
Log(Job.GetString)
Select Case Job.JobName
Case "SaveImage"
If s.Left(Job.GetString,6) = "Succes" Then
Else
Msgbox("An error occurred trying to save your records. Try again or contact support.","Records Saved Failed")
End If
End Select
Job.Release
Else
Msgbox("An error occurred trying to save your records. Try again or contact support.","Records Saved Failed")
End If
End Sub
I have had a look around the site, but cannot find any advice on this one...