public async Task <bool> GetTechnologes() { if (NetworkHelper.IsNetworkAvailable() == false) { await MessageHelper.ShowMessage("You require an active network connection to internet for registration"); this.ShowError = true; return(false); } try { this.OperationInProgress = true; // Fetch data about the existing user and assign it to view model. var checkProfileResponse = await ServiceProxy.CallService("api/CheckProfile", JsonConvert.SerializeObject(new CheckProfileRequest() { AuthProvider = this.AuthProvider, AuthProviderUserId = this.AuthProviderUserId })); if (checkProfileResponse.IsSuccess) { CheckProfileResponse authUserInfoResponse = JsonConvert.DeserializeObject <CheckProfileResponse>(checkProfileResponse.response); this.AudienceTypes = authUserInfoResponse.AudienceTypes; this.AllAudienceOrgTypes = authUserInfoResponse.AudienceOrgTypes; this.SecondaryTechnologies = authUserInfoResponse.SecondaryTechnologies; this.Cities = new ObservableCollection <City>(authUserInfoResponse.Cities); if (this.Cities == null) { this.Cities = new ObservableCollection <City>(); } else if (this.Cities.Count > 0) { this.City = this.Cities[0]; } if (this.AudienceTypes == null) { this.AudienceTypes = new List <AudienceType>(); } else if (this.AudienceTypes.Count > 0) { this.SelectedAudienceType = this.AudienceTypes[0]; } if (this.AudienceOrgTypes == null) { this.AudienceTypes = new List <AudienceType>(); } else if (this.AudienceOrgTypes.Count > 0) { this.SelectedAudienceOrgType = this.AudienceOrgTypes[0]; } this.OnPropertyChanged("AudienceTypes"); this.OnPropertyChanged("SecondaryTechnologies"); this.OnPropertyChanged("Cities"); if (authUserInfoResponse.IsRegistered) // check if user is exsting or not { this.FullName = authUserInfoResponse.FullName; this.Email = authUserInfoResponse.Email; this.AuthProvider = authUserInfoResponse.AuthProvider; this.AuthProviderUserId = authUserInfoResponse.AuthProviderUserId; this.City = authUserInfoResponse.City; this.Town = authUserInfoResponse.Town; this.Location = authUserInfoResponse.Location; this.SelectedAudienceType = authUserInfoResponse.SelectedAudienceType; this.SelectedAudienceOrgType = authUserInfoResponse.SelectedAudienceOrgType; this.DeviceId = authUserInfoResponse.DeviceId; this.UserId = authUserInfoResponse.UserId; if (!string.IsNullOrEmpty(this.DeviceId)) { this.PushEnabled = true; } await LocalStorage.SaveJsonToFile(this, "registration"); return(true); } else { await this.SetCity(await GeoLocationHelper.GetCity(this.Cities.ToList())); } } //else //{ // // if fetch data : FAILED. // //unable to register you... unable to save your profile... //} } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); return(false); } finally { this.OperationInProgress = false; } return(false); }