O'Reilly logo

Xamarin Studio for Android Programming: A C# Cookbook by Mathieu Nayrolles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required