Forum Xamarin.Forms

Location permission dialog hidden behind view

On my emulator when asking for permission to read GPS location, the permission dialog is not showing. I found that for some reason this dialog is hidden behind the view..

I wasn't able to find a solution for this other than "wait for a second before asking" which is not really a solution in my mind.

In ContentPage OnAppearing:

protected override async void OnAppearing()
{
await viewModel.ExecuteGetLocation();
}

In ViewModel:

public async Task ExecuteGetLocation()
{
var currentLocation = await Geolocation.GetLocationAsync();
}

Any idea why this happens and what I can do to fix it?

Thank you in advance

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    On which platform did this happen?
    Can you share a demo to help us reproduce this issue?
    The permission dialog should be displayed at the top level of the window.

Sign In or Register to comment.