Hello,
I want to provide permission both front & Back camera.
But I cannot initialize both the camera.
Below is my codes
I want to provide permission both front & Back camera.
But I cannot initialize both the camera.
Below is my codes
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private rp As RuntimePermissions
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private phonecam As Camera
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("MainPermission")
phonecam.Initialize <=== Here I am facing issue
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
rp.CheckAndRequest(rp.PERMISSION_CAMERA)
End Sub
Sub Permission_result(Permission As String, Result As Boolean)
If Permission=rp.PERMISSION_CAMERA Then
phonecam=Result <==What will b the properties for phonecam
End If
End Sub