set User Provider
Supply the account lazily. The provider is invoked at capture time (when the report screen opens), not when you register it — so the attached account always reflects the current session and never a stale value from a previous login. This is the primitive setUser is sugar over; registering a provider clears any static user previously set.
Keep provider fast and non-blocking — it runs on the main thread as the report screen opens. Return already-known values; do not perform I/O. Return null to attach no account for this report.
Safe to call from any thread, at any time after start.
Example:
BugScreenSDK.setUserProvider {
session.currentUser?.let { BugScreenUser(id = it.id, role = it.role) }
}Content copied to clipboard