Commit f082c4ed authored by Martin Finkel's avatar Martin Finkel

Add RTSP Mosaic sample

parent c2d2e786
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace VideoMosaic.Droid
{
[Activity(Label = "VideoMosaic", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.VideoMosaic">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
<application android:label="VideoMosaic.Android"></application>
</manifest>
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VideoMosaic.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("VideoMosaic.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("VideoMosaic.Droid.Resource", IsApplication=true)]
namespace VideoMosaic.Droid
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::VideoMosaic.Droid.Resource.Attribute.actionBarSize;
}
public partial class Animation
{
// aapt resource value: 0x7f050000
public const int abc_fade_in = 2131034112;
// aapt resource value: 0x7f050001
public const int abc_fade_out = 2131034113;
// aapt resource value: 0x7f050002
public const int abc_grow_fade_in_from_bottom = 2131034114;
// aapt resource value: 0x7f050003
public const int abc_popup_enter = 2131034115;
// aapt resource value: 0x7f050004
public const int abc_popup_exit = 2131034116;
// aapt resource value: 0x7f050005
public const int abc_shrink_fade_out_from_bottom = 2131034117;
// aapt resource value: 0x7f050006
public const int abc_slide_in_bottom = 2131034118;
// aapt resource value: 0x7f050007
public const int abc_slide_in_top = 2131034119;
// aapt resource value: 0x7f050008
public const int abc_slide_out_bottom = 2131034120;
// aapt resource value: 0x7f050009
public const int abc_slide_out_top = 2131034121;
// aapt resource value: 0x7f05000a
public const int design_bottom_sheet_slide_in = 2131034122;
// aapt resource value: 0x7f05000b
public const int design_bottom_sheet_slide_out = 2131034123;
// aapt resource value: 0x7f05000c
public const int design_snackbar_in = 2131034124;
// aapt resource value: 0x7f05000d
public const int design_snackbar_out = 2131034125;
// aapt resource value: 0x7f05000e
public const int tooltip_enter = 2131034126;
// aapt resource value: 0x7f05000f
public const int tooltip_exit = 2131034127;
static Animation()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animation()
{
}
}
public partial class Animator
{
// aapt resource value: 0x7f060000
public const int design_appbar_state_list_animator = 2131099648;
static Animator()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animator()
{
}
}
public partial class Attribute
{
// aapt resource value: 0x7f01006b
public const int actionBarDivider = 2130772075;
// aapt resource value: 0x7f01006c
public const int actionBarItemBackground = 2130772076;
// aapt resource value: 0x7f010065
public const int actionBarPopupTheme = 2130772069;
// aapt resource value: 0x7f01006a
public const int actionBarSize = 2130772074;
// aapt resource value: 0x7f010067
public const int actionBarSplitStyle = 2130772071;
// aapt resource value: 0x7f010066
public const int actionBarStyle = 2130772070;
// aapt resource value: 0x7f010061
public const int actionBarTabBarStyle = 2130772065;
// aapt resource value: 0x7f010060
public const int actionBarTabStyle = 2130772064;
// aapt resource value: 0x7f010062
public const int actionBarTabTextStyle = 2130772066;
// aapt resource value: 0x7f010068
public const int actionBarTheme = 2130772072;
// aapt resource value: 0x7f010069
public const int actionBarWidgetTheme = 2130772073;
// aapt resource value: 0x7f010086
public const int actionButtonStyle = 2130772102;
// aapt resource value: 0x7f010082
public const int actionDropDownStyle = 2130772098;
// aapt resource value: 0x7f0100dd
public const int actionLayout = 2130772189;
// aapt resource value: 0x7f01006d
public const int actionMenuTextAppearance = 2130772077;
// aapt resource value: 0x7f01006e
public const int actionMenuTextColor = 2130772078;
// aapt resource value: 0x7f010071
public const int actionModeBackground = 2130772081;
// aapt resource value: 0x7f010070
public const int actionModeCloseButtonStyle = 2130772080;
// aapt resource value: 0x7f010073
public const int actionModeCloseDrawable = 2130772083;
// aapt resource value: 0x7f010075
public const int actionModeCopyDrawable = 2130772085;
// aapt resource value: 0x7f010074
public const int actionModeCutDrawable = 2130772084;
// aapt resource value: 0x7f010079
public const int actionModeFindDrawable = 2130772089;
// aapt resource value: 0x7f010076
public const int actionModePasteDrawable = 2130772086;
// aapt resource value: 0x7f01007b
public const int actionModePopupWindowStyle = 2130772091;
// aapt resource value: 0x7f010077
public const int actionModeSelectAllDrawable = 2130772087;
// aapt resource value: 0x7f010078
public const int actionModeShareDrawable = 2130772088;
// aapt resource value: 0x7f010072
public const int actionModeSplitBackground = 2130772082;
// aapt resource value: 0x7f01006f
public const int actionModeStyle = 2130772079;
// aapt resource value: 0x7f01007a
public const int actionModeWebSearchDrawable = 2130772090;
// aapt resource value: 0x7f010063
public const int actionOverflowButtonStyle = 2130772067;
// aapt resource value: 0x7f010064
public const int actionOverflowMenuStyle = 2130772068;
// aapt resource value: 0x7f0100df
public const int actionProviderClass = 2130772191;
// aapt resource value: 0x7f0100de
public const int actionViewClass = 2130772190;
// aapt resource value: 0x7f01008e
public const int activityChooserViewStyle = 2130772110;
// aapt resource value: 0x7f0100b3
public const int alertDialogButtonGroupStyle = 2130772147;
// aapt resource value: 0x7f0100b4
public const int alertDialogCenterButtons = 2130772148;
// aapt resource value: 0x7f0100b2
public const int alertDialogStyle = 2130772146;
// aapt resource value: 0x7f0100b5
public const int alertDialogTheme = 2130772149;
// aapt resource value: 0x7f0100cb
public const int allowStacking = 2130772171;
// aapt resource value: 0x7f0100cc
public const int alpha = 2130772172;
// aapt resource value: 0x7f0100da
public const int alphabeticModifiers = 2130772186;
// aapt resource value: 0x7f0100d3
public const int arrowHeadLength = 2130772179;
// aapt resource value: 0x7f0100d4
public const int arrowShaftLength = 2130772180;
// aapt resource value: 0x7f0100ba
public const int autoCompleteTextViewStyle = 2130772154;
// aapt resource value: 0x7f010054
public const int autoSizeMaxTextSize = 2130772052;
// aapt resource value: 0x7f010053
public const int autoSizeMinTextSize = 2130772051;
// aapt resource value: 0x7f010052
public const int autoSizePresetSizes = 2130772050;
// aapt resource value: 0x7f010051
public const int autoSizeStepGranularity = 2130772049;
// aapt resource value: 0x7f010050
public const int autoSizeTextType = 2130772048;
// aapt resource value: 0x7f01002e
public const int background = 2130772014;
// aapt resource value: 0x7f010030
public const int backgroundSplit = 2130772016;
// aapt resource value: 0x7f01002f
public const int backgroundStacked = 2130772015;
// aapt resource value: 0x7f010116
public const int backgroundTint = 2130772246;
// aapt resource value: 0x7f010117
public const int backgroundTintMode = 2130772247;
// aapt resource value: 0x7f0100d5
public const int barLength = 2130772181;
// aapt resource value: 0x7f010141
public const int behavior_autoHide = 2130772289;
// aapt resource value: 0x7f01011e
public const int behavior_hideable = 2130772254;
// aapt resource value: 0x7f01014a
public const int behavior_overlapTop = 2130772298;
// aapt resource value: 0x7f01011d
public const int behavior_peekHeight = 2130772253;
// aapt resource value: 0x7f01011f
public const int behavior_skipCollapsed = 2130772255;
// aapt resource value: 0x7f01013f
public const int borderWidth = 2130772287;
// aapt resource value: 0x7f01008b
public const int borderlessButtonStyle = 2130772107;
// aapt resource value: 0x7f010139
public const int bottomSheetDialogTheme = 2130772281;
// aapt resource value: 0x7f01013a
public const int bottomSheetStyle = 2130772282;
// aapt resource value: 0x7f010088
public const int buttonBarButtonStyle = 2130772104;
// aapt resource value: 0x7f0100b8
public const int buttonBarNegativeButtonStyle = 2130772152;
// aapt resource value: 0x7f0100b9
public const int buttonBarNeutralButtonStyle = 2130772153;
// aapt resource value: 0x7f0100b7
public const int buttonBarPositiveButtonStyle = 2130772151;
// aapt resource value: 0x7f010087
public const int buttonBarStyle = 2130772103;
// aapt resource value: 0x7f01010b
public const int buttonGravity = 2130772235;
// aapt resource value: 0x7f010043
public const int buttonPanelSideLayout = 2130772035;
// aapt resource value: 0x7f0100bb
public const int buttonStyle = 2130772155;
// aapt resource value: 0x7f0100bc
public const int buttonStyleSmall = 2130772156;
// aapt resource value: 0x7f0100cd
public const int buttonTint = 2130772173;
// aapt resource value: 0x7f0100ce
public const int buttonTintMode = 2130772174;
// aapt resource value: 0x7f010017
public const int cardBackgroundColor = 2130771991;
// aapt resource value: 0x7f010018
public const int cardCornerRadius = 2130771992;
// aapt resource value: 0x7f010019
public const int cardElevation = 2130771993;
// aapt resource value: 0x7f01001a
public const int cardMaxElevation = 2130771994;
// aapt resource value: 0x7f01001c
public const int cardPreventCornerOverlap = 2130771996;
// aapt resource value: 0x7f01001b
public const int cardUseCompatPadding = 2130771995;
// aapt resource value: 0x7f0100bd
public const int checkboxStyle = 2130772157;
// aapt resource value: 0x7f0100be
public const int checkedTextViewStyle = 2130772158;
// aapt resource value: 0x7f0100ee
public const int closeIcon = 2130772206;
// aapt resource value: 0x7f010040
public const int closeItemLayout = 2130772032;
// aapt resource value: 0x7f01010d
public const int collapseContentDescription = 2130772237;
// aapt resource value: 0x7f01010c
public const int collapseIcon = 2130772236;
// aapt resource value: 0x7f01012c
public const int collapsedTitleGravity = 2130772268;
// aapt resource value: 0x7f010126
public const int collapsedTitleTextAppearance = 2130772262;
// aapt resource value: 0x7f0100cf
public const int color = 2130772175;
// aapt resource value: 0x7f0100aa
public const int colorAccent = 2130772138;
// aapt resource value: 0x7f0100b1
public const int colorBackgroundFloating = 2130772145;
// aapt resource value: 0x7f0100ae
public const int colorButtonNormal = 2130772142;
// aapt resource value: 0x7f0100ac
public const int colorControlActivated = 2130772140;
// aapt resource value: 0x7f0100ad
public const int colorControlHighlight = 2130772141;
// aapt resource value: 0x7f0100ab
public const int colorControlNormal = 2130772139;
// aapt resource value: 0x7f0100ca
public const int colorError = 2130772170;
// aapt resource value: 0x7f0100a8
public const int colorPrimary = 2130772136;
// aapt resource value: 0x7f0100a9
public const int colorPrimaryDark = 2130772137;
// aapt resource value: 0x7f0100af
public const int colorSwitchThumbNormal = 2130772143;
// aapt resource value: 0x7f0100f3
public const int commitIcon = 2130772211;
// aapt resource value: 0x7f0100e0
public const int contentDescription = 2130772192;
// aapt resource value: 0x7f010039
public const int contentInsetEnd = 2130772025;
// aapt resource value: 0x7f01003d
public const int contentInsetEndWithActions = 2130772029;
// aapt resource value: 0x7f01003a
public const int contentInsetLeft = 2130772026;
// aapt resource value: 0x7f01003b
public const int contentInsetRight = 2130772027;
// aapt resource value: 0x7f010038
public const int contentInsetStart = 2130772024;
// aapt resource value: 0x7f01003c
public const int contentInsetStartWithNavigation = 2130772028;
// aapt resource value: 0x7f01001d
public const int contentPadding = 2130771997;
// aapt resource value: 0x7f010021
public const int contentPaddingBottom = 2130772001;
// aapt resource value: 0x7f01001e
public const int contentPaddingLeft = 2130771998;
// aapt resource value: 0x7f01001f
public const int contentPaddingRight = 2130771999;
// aapt resource value: 0x7f010020
public const int contentPaddingTop = 2130772000;
// aapt resource value: 0x7f010127
public const int contentScrim = 2130772263;
// aapt resource value: 0x7f0100b0
public const int controlBackground = 2130772144;
// aapt resource value: 0x7f010160
public const int counterEnabled = 2130772320;
// aapt resource value: 0x7f010161
public const int counterMaxLength = 2130772321;
// aapt resource value: 0x7f010163
public const int counterOverflowTextAppearance = 2130772323;
// aapt resource value: 0x7f010162
public const int counterTextAppearance = 2130772322;
// aapt resource value: 0x7f010031
public const int customNavigationLayout = 2130772017;
// aapt resource value: 0x7f0100ed
public const int defaultQueryHint = 2130772205;
// aapt resource value: 0x7f010080
public const int dialogPreferredPadding = 2130772096;
// aapt resource value: 0x7f01007f
public const int dialogTheme = 2130772095;
// aapt resource value: 0x7f010027
public const int displayOptions = 2130772007;
// aapt resource value: 0x7f01002d
public const int divider = 2130772013;
// aapt resource value: 0x7f01008d
public const int dividerHorizontal = 2130772109;
// aapt resource value: 0x7f0100d9
public const int dividerPadding = 2130772185;
// aapt resource value: 0x7f01008c
public const int dividerVertical = 2130772108;
// aapt resource value: 0x7f0100d1
public const int drawableSize = 2130772177;
// aapt resource value: 0x7f010022
public const int drawerArrowStyle = 2130772002;
// aapt resource value: 0x7f01009f
public const int dropDownListViewStyle = 2130772127;
// aapt resource value: 0x7f010083
public const int dropdownListPreferredItemHeight = 2130772099;
// aapt resource value: 0x7f010094
public const int editTextBackground = 2130772116;
// aapt resource value: 0x7f010093
public const int editTextColor = 2130772115;
// aapt resource value: 0x7f0100bf
public const int editTextStyle = 2130772159;
// aapt resource value: 0x7f01003e
public const int elevation = 2130772030;
// aapt resource value: 0x7f01015e
public const int errorEnabled = 2130772318;
// aapt resource value: 0x7f01015f
public const int errorTextAppearance = 2130772319;
// aapt resource value: 0x7f010042
public const int expandActivityOverflowButtonDrawable = 2130772034;
// aapt resource value: 0x7f010118
public const int expanded = 2130772248;
// aapt resource value: 0x7f01012d
public const int expandedTitleGravity = 2130772269;
// aapt resource value: 0x7f010120
public const int expandedTitleMargin = 2130772256;
// aapt resource value: 0x7f010124
public const int expandedTitleMarginBottom = 2130772260;
// aapt resource value: 0x7f010123
public const int expandedTitleMarginEnd = 2130772259;
// aapt resource value: 0x7f010121
public const int expandedTitleMarginStart = 2130772257;
// aapt resource value: 0x7f010122
public const int expandedTitleMarginTop = 2130772258;