How can I set a timer to automatically take a picture using the Xamarin MediaPlugin

Posted on 2016-11-27
Medium Priority
Last Modified: 2016-11-29
This is basally what I want to do: The user taps a button, the camera comes on, a 5 second timer starts, they step back, center their face in the camera and the picture is taken automatically.

This is may camera code, this works but the user needs to push the camera button to take the picture. Thanks!

 var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
            DefaultCamera = Plugin.Media.Abstractions.CameraDevice.Front,
            PhotoSize = Plugin.Media.Abstractions.PhotoSize.Small

        if (file == null) return;

        byte[] imageAsBytes = null;
        using (var memoryStream = new MemoryStream())
            imageAsBytes = memoryStream.ToArray();

Open in new window

Question by:Bob Hoffman
  • 2

Accepted Solution

Bob Hoffman earned 0 total points
ID: 41906322
Seems this is not possible with the Media plugin. Was able to do it with AVFoundation.

Author Closing Comment

by:Bob Hoffman
ID: 41906323
figured it out myself

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
How to take pictures with depth using iOS 10
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question