Ron Dagdag
Published © MIT

Getting Started With Android Things + Xamarin Forms

Hello Android Things World for all C# and Xamarin Developers, a quick tutorial on setting up and build.

EasyProtip1 hour3,238
Getting Started With Android Things + Xamarin Forms

Things used in this project

Story

Read more

Code

MainActivity.cs

C#
using System;

using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

namespace firstforms.Droid
{
    [Activity(Label = "firstforms.Droid", Icon = "@drawable/icon", Theme = "@style/MyTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);

            LoadApplication(new App());
        }

        protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);
        }
    }
}

Credits

Ron Dagdag

Ron Dagdag

39 projects • 331 followers
Microsoft MVP / Lead Software Engineer / Augmented Reality. Developer Passionate to learn about Robotics, VR, AR, ML, IOT

Comments