Introduction
Xamarin is a platform to develop the cross-platform and multi-platform apps. (Ex. Windows phone, Android, iOS) in Xamarin platform, where code sharing concept is used. In Xamarin studio, Visual Studio is also available.
Video Record control is used to how to record video, using camera and Mic.
Prerequisites
- Visual Studio 2015 Update 3
The steps, given below need to be followed in order to record video in Android app, using Visual Studio 2015.
Step 1
Click file--> Select New--> select Project. The project needs to be clicked after opening all the types of projects in Visual Studio
or click (Ctrl+Shift+N).

Step 2
After opening the New Project, select Installed-->Templates-->Visual C#-->Android-->choose the Blank app (Android).
Now, give your Android app name (Ex:sample) and give path of your project. Afterwards, click OK.

Step 3
Now, go to Solution Explorer. In Solution Explorer, get all the files and the source in your project.
Now, select Resource-->Layout--> double click to open main.axml page. You need to select the source to write XAML code.
If you want to design, choose the designer Window and you can design your app.

Step 4
After opening, main.axml file will open the main page designer. In this page, you can design this page, which type do you want?

Now, delete the Linear Layout and Default hello world button. Go to the source panel and you can see the button coding. You need to delete it.
After deleting XAML code, delete C# button action code.
Go to the MainActivity.cs page. You need to delete the button code.
Step 5
Now, go to the toolbox Window in the toolbox Window. Get all types of the tools and control. You will go to the toolbox Window. Now, scroll down and you will see all the tools, control.
You need to drag and drop the three buttons.

Step 6
Now, go to the properties Window. You need to edit the First Button Id value and Text value (Ex:android:id="@+id/Record" android:text="Record").

Step 7
You need to edit the Second Button Id value and Text value (Ex:android:id="@+id/Stop" android:text="Stop").

Step 8
You need to edit the Third Button Id value and Text value (Ex:android:id="@+id/Play" android:text="Play").

Step 9
In this step, you need to drag and drop the VideoView.

Step 10
Now, go to the properties Window. You need to edit the Video View Id value (Ex:android:id="@+id/SampleVideoView" ).

Step 11
In this step, go to the Main.axml page Source Panel. Note the Id value.

Main.axml
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
- <Button android:id="@+id/Record" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Record" />
- <Button android:id="@+id/Stop" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Stop" />
- <Button android:id="@+id/Play" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Play" />
- <VideoView android:id="@+id/SampleVideoView" android:layout_width="fill_parent" android:layout_height="fill_parent" />
- </LinearLayout>











Michael AlaohuruPosted Feb 10, 2019, 3:54 PM
Please how do i make video record in portrait?
Akid HouriehPosted Feb 5, 2018, 7:12 AM
The video not saved and the quality very low !?
Praddy KPosted Dec 26, 2017, 6:01 AM
Hi Delpin, Do you have similar solution for IOS??
Prasanna MuraliPosted Oct 22, 2016, 12:08 PM
Nice post..
Shamim UddinPosted Oct 19, 2016, 10:40 PM
Nice
Joe WilsonPosted Oct 19, 2016, 2:21 PM
Thank you.