I used the CameraEx example and it works perfectly, except that it doesn't save the image to my phone (Redmi Note4).
The relevant sub in the example is given as:
Sub Camera1_PictureTaken (Data() As Byte)
Dim filename As String = "1.jpg"
Dim dir As String = File.DirInternal
camEx.SavePictureToFile(Data, dir, filename)
camEx.StartPreview 'restart preview
ToastMessageShow("Picture saved." & CRLF & "File size: " & File.Size(dir, filename), True)
End Sub
The image directory on my android is: "\SanDisk SD card\DCIM\Camera\"
and the book "B4A Rapid Android App..." states "the image will be stored in the folder /mnt/sdcard/DCIM/Camera.
How should I modify the sub "PictureTaken" to save the image?
The relevant sub in the example is given as:
Sub Camera1_PictureTaken (Data() As Byte)
Dim filename As String = "1.jpg"
Dim dir As String = File.DirInternal
camEx.SavePictureToFile(Data, dir, filename)
camEx.StartPreview 'restart preview
ToastMessageShow("Picture saved." & CRLF & "File size: " & File.Size(dir, filename), True)
End Sub
The image directory on my android is: "\SanDisk SD card\DCIM\Camera\"
and the book "B4A Rapid Android App..." states "the image will be stored in the folder /mnt/sdcard/DCIM/Camera.
How should I modify the sub "PictureTaken" to save the image?