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

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

Sign In or Register to comment.