A Microsoft framework for building cross-platform mobile apps using .NET and C# with native performance and user interfaces.
Hello,
Welcome to our Microsoft Q&A platform!
Hi, hosseintavakoli. To take picture with front camera, try to replace the mCaptureSession.Capture(..) command with CaptureStillPicture() method.
private void LockFocus()
{
try
{
// This is how to tell the camera to lock focus.
mPreviewRequestBuilder.Set(CaptureRequest.ControlAfTrigger, (int)ControlAFTrigger.Start);
// Tell #mCaptureCallback to wait for the lock.
mState = STATE_WAITING_LOCK;
//mCaptureSession.Capture(mPreviewRequestBuilder.Build(), mCaptureCallback,mBackgroundHandler);
CaptureStillPicture();
}
catch (CameraAccessException e)
{
e.PrintStackTrace();
}
}
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.