public void SetIsPermissionGrantedWhenRequested(bool isPermissionGranted) { _isPermissionGrantedWhenRequested = isPermissionGranted; if (_isPermissionRequested) { LocationPermissionChanged?.Invoke(this, new LocationPermissionChangedEventArgs(_isPermissionGrantedWhenRequested)); } }
public async Task <bool> RequestPermission(CancellationToken ct) { if (!_isPermissionRequested) { _isPermissionRequested = true; if (_isPermissionGrantedWhenRequested) { LocationPermissionChanged?.Invoke(this, new LocationPermissionChangedEventArgs(_isPermissionGrantedWhenRequested)); } } return(_isPermissionGrantedWhenRequested); }
private void OnStatusChanged(Geolocator sender, StatusChangedEventArgs args) { LocationPermissionChanged?.Invoke(sender, new LocationPermissionChangedEventArgs(args.Status == PositionStatus.Ready)); }