Setting up the SpeechTalk.Droid project
Let's do the same for Android and set up Xamarin.Forms
accordingly. Inside our Android project, open the MainActivity.cs
class and look at the OnCreate
function:
[Activity (Label = "SpeechTalk.Droid", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity { protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); global::Xamarin.Forms.Forms.Init (this, bundle); LoadApplication (new App ()); } }
The MainActivity
class must inherit Xamarin.Forms.Platform.Android.FormsApplicationActivity
; we must call the super class OnCreate
method before we initialize Xamarin.Forms
and load in our new instantiated app class. That's all, we can now...