shouldSendTelemetry method

bool shouldSendTelemetry(
  1. SDKEnvironment environment
)

Check if telemetry should be sent

Implementation

bool shouldSendTelemetry(SDKEnvironment environment) {
  try {
    final lib = PlatformLoader.loadCommons();
    final shouldSendFn = lib
        .lookupFunction<Int32 Function(Int32), int Function(int)>(
          'rac_env_should_send_telemetry',
        );

    return shouldSendFn(_environmentToInt(environment)) != 0;
  } catch (e) {
    // Only production sends telemetry
    return environment == SDKEnvironment.SDK_ENVIRONMENT_PRODUCTION;
  }
}