Android Question Cameraexclass: Picture sizes

grafsoft

Well-Known Member
Licensed User
Hi,

my problem: On my device the photos are OK, with enough resolution. On another device, it is just 176 x 144 pixels.

So I think I have to set the picture size.

B4X:
Private Sub InitializeCamera
   Try
   camEx.Initialize(Panel1, frontCamera, Me, "Camera1")
   ' camEx.SetPictureSize (Panel1.Width,Panel1.Height)
   
'   Dim pictureSizes() As CameraSize = camEx.GetSupportedPicturesSizes
'   For Each cs As CameraSize In pictureSizes
'      Msgbox (cs.Width,cs.Height)
'    Next
   
   Dim lst As List
   lst.Initialize
   lst.AddAll(camEx.getSupportedPicturesSizes)
   
   For i=0 To lst.Size-1
     Log(lst.Get(i))
   Next
   frontCamera = camEx.Front
   Catch
     Dim s As String
     s="Camera Resume " & LastException.Message
     Log (s)
     
   End Try
End Sub
All the lines with getSupportedPicturesSizes and setpicturesize throw an error, "Nosuchmethodexception".

What can I do?
 

grafsoft

Well-Known Member
Licensed User
Yes, I see this and RunMethod("getSupportedPictureSizes") in the class module. But yesterday we tried it on 7-8 Android 4 and 5 devices. All of them show the same error.

Can somebody show me a code snippet that works for him/her?
 
Top