title: How to open setting from our application in xamarin.forms?
body: <p><strong>I am working on xamarin.forms.</strong> (Facing below problem only in android) </p>
  
  <p>When my application is started it checks my GPS location is on or off. </p>
  
  <p>To check GPS location on or off I am using dependency service.</p>
  
  <pre><code>public static bool CheckGPSConnection()
          {
              var gpsConnection = DependencyService.Get&lt;IGPSConnectivity&gt;();
              return gpsConnection.CheckGPSConnection();
          }
  </code></pre>
  
  <p>When I come to Home page of my application I put following code</p>
  
  <pre><code>if (Device.OS == TargetPlatform.Android)
  {
      if (!App.CheckGPSConnection())
      {
          bool answer = await DisplayAlert("Alert", "Would you like to start GPS?", "Yes", "No");
          if (answer)
          {
                Android.App.Application.Context.StartActivity(new Android.Content.Intent(Android.Provider.Settings.ActionLocationSourceSettings));
          }
      }
  }
  </code></pre>
  
  <p>but it's giving me an exception</p>
  
  <blockquote>
    <p>{Android.Util.AndroidRuntimeException: Calling startActivity() from
    outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK
    flag. Is this really what you want?   at
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
    [0x0000c] in /Users/…}</p>
  </blockquote>
  
  <p><strong>What should I do?</strong></p>