Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Problem in getting event for allow or don't allow on LOcation GPS enable

$
0
0

Hi Evenryone,

I am facing problem to get the code wait for "Allow" or Don't Allow"
below is my code
bool istrue = false;
CLLocationManager locationManager = new CLLocationManager();
Version version = new Version (UIDevice.CurrentDevice.SystemVersion);
if (version >= new Version (8,0))
{

            locationManager.RequestWhenInUseAuthorization ();
        } 
        else 
        {
            locationManager.StartUpdatingLocation();
        }

        while (!istrue)
        {

        }

I want to wait my code for the action "Allow" or "Don't Allow" by user.
Any suggestion is most welcome.

Many many thanks to you in advance.

Thanks,
Praveen Kumar


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>