Using the camera

In this recipe, we will learn how to display the camera feed in our application. This simple yet powerful feature can be integrated in many ways to your applications. Indeed, you can envision applications that allow a live video feed, such as Skype.

Getting ready

Create a new solution named CameraTest and open it in Xamarin Studio. This recipe will only work on a physical device.

How to do it...

  1. Open the AndroidManifest.xml file under the Properties folder and request the Camera, CaptureVideoOutput and Write external permissions.
  2. Now add the following statement to the AndroidManifest.xml file:
    <application android:hardwareAccelerated="true"/>
  3. In the minimum and target Android version, choose the following: Override – Android 4.4 (API ...

Get Xamarin Studio for Android Programming: A C# Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.