I have this method in the Code behind my view which is a ContentPage...
public void DisplayAlert(string title, string message, string accept, string cancel)
{
base.DisplayAlert(title, message, accept, cancel);
}
This works fine on windows phone but completely crashes out of the application with this exception:
08-19 10:53:01.874 E/mono ( 1306): Unhandled Exception:
08-19 10:53:01.874 E/mono ( 1306): Java.Lang.RuntimeException: Exception of type 'Java.Lang.RuntimeException' was thrown.
08-19 10:53:01.874 E/mono ( 1306): at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod) [0x00063] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.14-series/a5d57087/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:177
08-19 10:53:01.874 E/mono ( 1306): at Android.App.AlertDialog+Builder.Create () [0x00043] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.14-series/a5d57087/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.App.AlertDialog.cs:156
08-19 10:53:01.874 E/mono ( 1306): at Xamarin.Forms.Platform.Android.AndroidActivity.b__1 (Xamarin.Forms.Page sender, Xamarin.Forms.AlertArguments arguments) [0x00000] in :0
08-19 10:53:01.874 E/mono ( 1306): at Xamarin.Forms.MessagingCenter+<>c__DisplayClass1`2[Xamarin.Forms.Page,Xamarin.Forms.AlertArguments].b__0 (System.Object sender, System.Object args) [0x00000] in :0
08-19 10:53:01.874 E/mono ( 1306): at Xamarin.Forms.MessagingCenter.InnerSend (System.String message, System.Type send
I can't understand this, is it because the DisplayAlter is an awaitable task?