Private Sub StartCamera
rp.CheckAndRequest(rp.PERMISSION_CAMERA)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
Log("No permission!")
Return
Else
Log("permission OK")
ProgressDialogShow2("Generate kode barcode...", False)
Kode_QRBarcode
End If
StartCameraShared
camEx.Initialize(pnlPreview, False, Me, "Camera1")
Wait For Camera1_Ready (Success As Boolean)
If Success Then
camEx.SetContinuousAutoFocus
camEx.CommitParameters
camEx.StartPreview
Else
Log("Error opening camera")
StopCamera
End If
End Sub