title: Xamarin Forms How to know when a call is currently taking place
body: <p>I am writing some code for a Xamarin Forms Android app which dials a phone number but I don't want to dial the number if the user is currently on a call(whether incoming or outgoing, it doesn't make a difference). I have researched a lot about the phone state but I can't find what I am looking for, unless I am applying it incorrectly. What I need is something like this:</p>
  
  <pre><code>if (NoCurrentCallIsTakingPlace)
  {
      var uri = Android.Net.Uri.Parse(string.Format("tel:{0}", PhoneNumber));
      var intent = new Intent(Intent.ActionCall, uri);
      Xamarin.Forms.Forms.Context.StartActivity(CurrentIntent);
  }
  </code></pre>
  
  <p>The code to dial the number works but it's the the conditional statement/code to check the phone state that I am having a problem with. Please could someone help. Apologies if your need more info. Please let me know and I will provide it. Thank you.</p>