getUserId

open fun getUserId(): String

Returns the current user identifier.

This method retrieves the user ID that was previously set using setUserId. Returns null if no user ID has been set. Example:


  String userId = Pushwoosh.getInstance().getUserId();
  if (userId != null) {
      Log.d("Pushwoosh", "Current user: " + userId);
  } else {
      Log.d("Pushwoosh", "No user ID set");
  }

Return

current user id or null if not set

See also