The picture can be taken when the preview is visible, but you can put the view on which it is displayed in a way that only one pixel is visible, and that is enough.
The activity must be on but you can make it minimal but not showing any other view on it and closing it as soon as the picture is taken.
The picture can be taken when the preview is visible, but you can put the view on which it is displayed in a way that only one pixel is visible, and that is enough.
The activity must be on but you can make it minimal but not showing any other view on it and closing it as soon as the picture is taken.
Sub Activity_Create(FirstTime As Boolean)
Activity.Color = Colors.Transparent
photopanel.Initialize("")
Activity.AddView(photopanel,Activity.Width - 1dip,Activity.Height - 1dip,480,480)'ignore
End Sub
Sub Activity_Resume
cam.Initialize(photopanel,"Cam")
End Sub
Sub Cam_Ready (Success As Boolean)
Try
If Success Then
cam.StartPreview
cam.TakePicture
Log("take picture")
End If
Catch
CallSub("runapp","send")
End Try
End Sub