startUserX static method

Future<void> startUserX()

Initialize UserX

Implementation

static Future<void> startUserX() async {
  if (kIsWeb || !Platform.isAndroid && !Platform.isIOS) return;

  final sessions = DSRemoteConfig.I.getUserXSessions();
  if (sessions != 0 && sessions < DSPrefs.I.getSessionId()) {
    return;
  }

  reportEvent('userx starting');
  UserX.start(_userXKey);
  UserX.setUserId(yandexId);
  _userXRunning = true;
}