title: Prevent closing by hardware back button in xamarin forms on android
body: <p>I want to prevent closing the app by pressing the hardware back button in xamarin forms on android.</p>
  
  <p>I want, that you can navigate with the hardware back button in the app (what is working), but do not want to exit, when the first page in navigation stack is reached.</p>
  
  <p>I tried to use the <a href="http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/app-lifecycle/">OnSleep</a> event in xamarin forms, but here I can not cancel the exit.</p>
  
  <p>I also tried catching the back button in android:</p>
  
  <pre><code>    public override void OnBackPressed()
      {
          //base.OnBackPressed();
      }
  </code></pre>
  
  <p>But when using xamarin forms, I do not know which page is currently showing. So I do not know if the navigation back is allowed or not </p>