Reminisce
Active Member
Snippet:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
Dim rp As RuntimePermissions
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
rp.CheckAndRequest(rp.PERMISSION_CAMERA)
rp.CheckAndRequest(rp.PERMISSION_RECORD_AUDIO)
rp.CheckAndRequest(rp.PERMISSION_READ_EXTERNAL_STORAGE)
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Not(Result) Then
ExitApplication
Return
End If
If FirstTime Then
CameraView1.Initialize2(pnlCamOne,"cameraview1",0)
End If
End Sub
Sub CameraView1_Ready (Success As Boolean)
If Success Then
camOneActive = True
CameraView1.StartPreview
txtCamOne.Text = "Active"
'I want to log current FPS to textview
Else
ToastMessageShow("Cannot open camera.", True)
End If
End Sub
I know android has deprecated the Camera Class and Camera2 is what I should use, but this is just for learning purposes, thanks.
Last edited: