protected override async void OnAppearing() { base.OnAppearing(); var acEnabled = await AppCenter.IsEnabledAsync(); DistributeEnabledSwitchCell.On = await Distribute.IsEnabledAsync(); DistributeEnabledSwitchCell.IsEnabled = acEnabled; PushEnabledSwitchCell.On = await Push.IsEnabledAsync(); PushEnabledSwitchCell.IsEnabled = acEnabled; RumEnabledSwitchCell.On = _rumStarted && await RealUserMeasurements.IsEnabledAsync(); RumEnabledSwitchCell.IsEnabled = acEnabled; EventFilterEnabledSwitchCell.On = _eventFilterStarted && await EventFilterHolder.Implementation?.IsEnabledAsync(); EventFilterEnabledSwitchCell.IsEnabled = acEnabled && EventFilterHolder.Implementation != null; if (userInfo?.AccountId != null) { SignInInformationButton.Text = "User authenticated"; } else { SignInInformationButton.Text = "User not authenticated"; } }
protected override async void OnAppearing() { base.OnAppearing(); var acEnabled = await AppCenter.IsEnabledAsync(); DistributeEnabledSwitchCell.On = await Distribute.IsEnabledAsync(); DistributeEnabledSwitchCell.IsEnabled = acEnabled; PushEnabledSwitchCell.On = await Push.IsEnabledAsync(); PushEnabledSwitchCell.IsEnabled = acEnabled; AuthEnabledSwitchCell.On = await Auth.IsEnabledAsync(); AuthEnabledSwitchCell.IsEnabled = acEnabled; RumEnabledSwitchCell.On = _rumStarted && await RealUserMeasurements.IsEnabledAsync(); RumEnabledSwitchCell.IsEnabled = acEnabled; EventFilterEnabledSwitchCell.On = _eventFilterStarted && await EventFilterHolder.Implementation?.IsEnabledAsync(); EventFilterEnabledSwitchCell.IsEnabled = acEnabled && EventFilterHolder.Implementation != null; if (!Application.Current.Properties.ContainsKey(AccountId)) { SignInInformationButton.Text = "Authentication status unknown"; } else if (Application.Current.Properties[AccountId] is string) { SignInInformationButton.Text = "User is authenticated"; } else { SignInInformationButton.Text = "User is not authenticated"; } }
protected override async void OnAppearing() { base.OnAppearing(); var acEnabled = await AppCenter.IsEnabledAsync(); DistributeEnabledSwitchCell.On = await Distribute.IsEnabledAsync(); DistributeEnabledSwitchCell.IsEnabled = acEnabled; PushEnabledSwitchCell.On = await Push.IsEnabledAsync(); PushEnabledSwitchCell.IsEnabled = acEnabled; RumEnabledSwitchCell.On = await RealUserMeasurements.IsEnabledAsync(); RumEnabledSwitchCell.IsEnabled = acEnabled; }
protected override async void OnAppearing() { base.OnAppearing(); var acEnabled = await AppCenter.IsEnabledAsync(); DistributeEnabledSwitchCell.On = await Distribute.IsEnabledAsync(); DistributeEnabledSwitchCell.IsEnabled = acEnabled; PushEnabledSwitchCell.On = await Push.IsEnabledAsync(); PushEnabledSwitchCell.IsEnabled = acEnabled; RumEnabledSwitchCell.On = _rumStarted && await RealUserMeasurements.IsEnabledAsync(); RumEnabledSwitchCell.IsEnabled = acEnabled; EventFilterEnabledSwitchCell.On = _eventFilterStarted && await EventFilterHolder.Implementation?.IsEnabledAsync(); EventFilterEnabledSwitchCell.IsEnabled = acEnabled && EventFilterHolder.Implementation != null; }
protected override async void OnAppearing() { base.OnAppearing(); var mcEnabled = await MobileCenter.IsEnabledAsync(); DistributeEnabledSwitchCell.On = await Distribute.IsEnabledAsync(); DistributeEnabledSwitchCell.IsEnabled = mcEnabled; PushEnabledSwitchCell.On = await Push.IsEnabledAsync(); PushEnabledSwitchCell.IsEnabled = mcEnabled; if (XamarinDevice.RuntimePlatform == XamarinDevice.Android) { if (!Application.Current.Properties.ContainsKey(FirebaseEnabledKey)) { Application.Current.Properties[FirebaseEnabledKey] = false; } FirebaseAnalyticsEnabledSwitchCell.On = (bool)Application.Current.Properties[FirebaseEnabledKey]; } RumEnabledSwitchCell.On = await RealUserMeasurements.IsEnabledAsync(); RumEnabledSwitchCell.IsEnabled = mcEnabled; }