0

The user gave location permission but the location is off. I wanna make a dialog box and ask the user to enable the location. I found a lot of similar questions but could not make it work. Can u help me? (Do I need to make 2 platform-specific implementations? or can I use xamarin forms?)

  • just use a DisplayAlert and prompt the user to enable Location – Jason Mar 11 '21 at 14:41
  • the result i'm trying to achieve is a display alert with 2 options. Ex: enable the location: yes // no. and when the user press yes,the location will be enabled from code by me. –  Mar 11 '21 at 14:50
  • You can't enable location if the user has disabled it. Only the user can do that. All you can do is prompt them to go do it. – Jason Mar 11 '21 at 14:52
  • But Waze is doing this –  Mar 11 '21 at 14:56
  • 1
    In Xamarin.forms, you could use the `Plugin.Permissions` to ask for the runtime permission. https://www.nuget.org/packages/Plugin.Permissions Like Jason said, you could use a DisplayAlert or a button to trigger before you want to use the Location. Here is a sample i done before to ask for the runtime permission. https://stackoverflow.com/questions/59771557/xamarin-requesting-camera-permissions-in-webview – Wendy Zang - MSFT Mar 12 '21 at 07:45

0 Answers0