setUserId static method

Future<bool> setUserId(
  1. String userId
)

Switches the active user for the underlying native SDK instance.

Android behavior:

  • Stops the current recording/session (if running)
  • Switches SDK identity to the provided userId
  • Refreshes configuration from the server for the new user

Notes:

  • This Future completes when the native Android SDK finishes the refresh via its init callback (success/failure).
  • You should call startRecording() again after this returns true.
  • Returns false if the request is rejected locally (e.g., blank userId, SDK not initialized) or if the refresh fails.

Implementation

static Future<bool> setUserId(String userId) async {
  return wingify.WingifyFlutter.setUserId(userId);
}