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

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

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