Taking screenshots with the camera

In this recipe, we will use the default camera application in our own application and take advantage of it to save pictures. This is the opposite to the first recipe of this chapter, where we were displaying a feed coming directly from the hardware camera and bypassing the Android default application for the camera.

Getting ready

Create a new solution named CameraPicture and open it in Xamarin Studio.

How to do it...

  1. Create another project in the solution created in the first recipe and name it CameraPicture.
  2. Add the following code into your Main.axml file:
    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" ...

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.