// IAnalyticsSink protected override void SetUserIdInternal(string userId) { AppCenter.SetUserId(userId); // AppCenter.SetUserId does not set user id in analytics data, only in crash reports, so merge this in to properties this.internalProperties[InternalPropertyNames.UserId] = userId; }
public AppCenterLoggerProvider(IOptionsMonitor <AppCenterLoggerOptions> options) { _options = options; _loggers = new ConcurrentDictionary <string, AppCenterLogger>(); AppCenterBase.LogLevel = _options.CurrentValue.AppCenterLogLevel; AppCenterBase.Start(_options.CurrentValue.AppCenterSecret, typeof(Analytics), typeof(Crashes)); ReloadLoggerOptions(options.CurrentValue); }
private void setAppCenterUserId(string id) { try { AppCenter.SetUserId(id); } catch { /* This catch intentionally left blank. * Failure to set the user id for analytics is not a reason to crash the app. * And there are no reasonable ways to gracefuly recover from this. */ } }
public async Task TurnOnInstallIdSending() { this.internalProperties[InternalPropertyNames.InstallationId] = await AppCenter.GetInstallIdAsync(); }