Create “Press back again to exit” toast on Xamarin Androd

I found this relatively simple to implement.

AndroidToast

In the Activity that represents the final view of your application, i.e. the one that you want the user to see the Toast popup message, add this override code:

private double _backPressTime = 0;

public override void OnBackPressed()
{
	double t = new TimeSpan(DateTime.Now.Ticks).TotalMilliseconds;

	if (t - _backPressTime > 2000) // i.e. 2000 milliseconds
	{
		_backPressTime = t;
		Toast.MakeText(this, "Press back again to exit", ToastLength.Short)
				.Show();
	}
	else
	{
		base.OnBackPressed(); // now we can quit
	}
}