title: Geolocation.GetLocationAsync is not working
body: <p>I have a Xamarin.Forms application that supports UWP, iOS, and Android. Specifically, I am now testing my app on Android emulator. For getting location, I am using Xamarin.Essentials. Here are pieces of my code:</p>
  
  <p>In a PageModel:</p>
  
  <pre><code>                    bu = await GeolocationSrvc.GetBusinessUnitAsync();
  </code></pre>
  
  <p>And here is the implementation of the method above:</p>
  
  <pre><code>    public static async Task&lt;BusinessUnits&gt; GetBusinessUnitAsync()
      {
          BusinessUnits bu = BusinessUnits.Aus;
  
          try
          {
              Location location = await GetLocation().ConfigureAwait(false);
  
              IEnumerable&lt;Placemark&gt; placemarks = await Geocoding.GetPlacemarksAsync(location);
              Placemark placemark = placemarks?.FirstOrDefault();
              string countryCode = placemark?.CountryCode;
  
              switch (countryCode)
              {
                  case "AQ":
                  case "AU":
                  case "NZ":
                      bu = BusinessUnits.Aus;
                      break;
                  default:
                      bu = BusinessUnits.NA;
                      break;
              }
          }
          catch (Exception)
          {
              throw;
          }
  
          return bu;
      }
  
      private static Task&lt;Location&gt; GetLocation()
      {
          GeolocationRequest request = new GeolocationRequest(GeolocationAccuracy.Medium, TimeSpan.FromSeconds(10));
          TaskCompletionSource&lt;Location&gt; locationTaskCompletionSource = new TaskCompletionSource&lt;Location&gt;();
  
          Device.BeginInvokeOnMainThread(async () =&gt;
          {
              locationTaskCompletionSource.SetResult(await Geolocation.GetLocationAsync(request));
          });
  
          return locationTaskCompletionSource.Task;
      }
  </code></pre>
  
  <p>When the execution comes to </p>
  
  <pre><code>locationTaskCompletionSource.SetResult(await Geolocation.GetLocationAsync(request));
  </code></pre>
  
  <p>I am asked if I want to allow the app to get my location. If I press Yes, it works as expected. But if I press No, the location is never returned (not even null), the following code is never executed. I expected in case of answering No to use default value set in </p>
  
  <pre><code>BusinessUnits bu = BusinessUnits.Aus;
  </code></pre>
  
  <p>But it does not happen. </p>