Reference
Every public method of Screeb.Maui, with its signature.
Complete reference for the Screeb .NET MAUI SDK. New to Screeb? Start with the install guide.
Methods by capability
Section titled “Methods by capability”Lifecycle
Section titled “Lifecycle”| Method | Description | More |
|---|---|---|
InitSdk(string channelId, string? userId = null, Dictionary<string, object>? properties = null, ScreebHooks? hooks = null, ScreebInitOptions? initOptions = null, string? language = null): Task<bool?> |
Initialize the Screeb SDK. Must be called before any other method. | Guide |
CloseSdk(): Task<bool?> |
Stop the SDK. Opposite of InitSdk. | Guide |
Identity
Section titled “Identity”| Method | Description | More |
|---|---|---|
SetIdentity(string userId, Dictionary<string, object>? properties = null): Task<bool?> |
Identify the current user with optional properties. | Guide |
SetProperties(Dictionary<string, object>? properties = null): Task<bool?> |
Send visitor properties without changing the identity. | Guide |
ResetIdentity(): Task<bool?> |
Reset user identity (e.g. on logout). | Guide |
SetAnonymousId(string anonymousId): Task<bool?> |
Adopts the anonymous id your CDP already uses (Amplitude device id, Segment or RudderStack anonymous id) on the current respondent, which stays anonymous. Call it right after |
Guide |
GetIdentity(): Task<Dictionary<string, object>?> |
Get current visitor identity and properties. | Guide |
Groups
Section titled “Groups”| Method | Description | More |
|---|---|---|
AssignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?> |
Assign the current user to a group. | Guide |
UnassignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?> |
Remove the current user from a group. | Guide |
Tracking
Section titled “Tracking”| Method | Description | More |
|---|---|---|
TrackEvent(string name, Dictionary<string, object>? properties = null): Task<bool?> |
Track a custom event. | Guide |
TrackScreen(string name, Dictionary<string, object>? properties = null): Task<bool?> |
Track a screen navigation event. | Guide |
Surveys
Section titled “Surveys”| Method | Description | More |
|---|---|---|
StartSurvey(string surveyId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreSurveyStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?> |
Start a specific survey programmatically. | Guide |
CloseSurvey(string? surveyId = null): Task<bool?> |
Close the currently displayed survey. | - |
Messages
Section titled “Messages”| Method | Description | More |
|---|---|---|
StartMessage(string messageId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreMessageStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?> |
Start a specific message programmatically. | Guide |
CloseMessage(string? messageId = null): Task<bool?> |
Close the currently displayed message. | Guide |
Session replay
Section titled “Session replay”| Method | Description | More |
|---|---|---|
SessionReplayStart(): Task<bool?> |
Start session replay recording. | Guide |
SessionReplayStop(): Task<bool?> |
Stop session replay recording. | Guide |
| Method | Description | More |
|---|---|---|
Debug(): Task<string?> |
Get SDK debug information. | Guide |
DebugTargeting(): Task<string?> |
Get targeting debug information (why surveys aren’t showing). | Guide |
Privacy helpers
Section titled “Privacy helpers”| Method | Description | More |
|---|---|---|
ScreebMaskText(this T element): T |
Mask a view or component in session replay. | Guide |
ScreebNoCapture(this T element): T |
Exclude a view or component from session replay capture. | Guide |
ScreebId(this T element, string id): T |
Set a stable Screeb element ID for IAM targeting. | Guide |
| Method | Description | More |
|---|---|---|
HandleDeepLink(string url): Task<bool?> |
Forward a Screeb deep link (screeb-<channel-id> scheme) to the SDK - editor, survey and message links open in-app. Call from your platform’s open-URL entry point (iOS OpenUrl / Android OnNewIntent). | - |
API signatures
Section titled “API signatures”Lifecycle
Section titled “Lifecycle”InitSdk(string channelId, string? userId = null, Dictionary<string, object>? properties = null, ScreebHooks? hooks = null, ScreebInitOptions? initOptions = null, string? language = null): Task<bool?>CloseSdk(): Task<bool?>Identity
Section titled “Identity”SetIdentity(string userId, Dictionary<string, object>? properties = null): Task<bool?>SetProperties(Dictionary<string, object>? properties = null): Task<bool?>ResetIdentity(): Task<bool?>SetAnonymousId(string anonymousId): Task<bool?>GetIdentity(): Task<Dictionary<string, object>?>Groups
Section titled “Groups”AssignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?>UnassignGroup(string? groupType, string groupName, Dictionary<string, object>? properties = null): Task<bool?>Tracking
Section titled “Tracking”TrackEvent(string name, Dictionary<string, object>? properties = null): Task<bool?>TrackScreen(string name, Dictionary<string, object>? properties = null): Task<bool?>Surveys
Section titled “Surveys”StartSurvey(string surveyId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreSurveyStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?>CloseSurvey(string? surveyId = null): Task<bool?>Messages
Section titled “Messages”StartMessage(string messageId, bool allowMultipleResponses = true, Dictionary<string, object>? hiddenFields = null, bool ignoreMessageStatus = true, ScreebHooks? hooks = null, string? language = null, string? distributionId = null): Task<bool?>CloseMessage(string? messageId = null): Task<bool?>Session replay
Section titled “Session replay”SessionReplayStart(): Task<bool?>SessionReplayStop(): Task<bool?>Debug(): Task<string?>DebugTargeting(): Task<string?>Privacy helpers
Section titled “Privacy helpers”ScreebMaskText(this T element): TScreebNoCapture(this T element): TScreebId(this T element, string id): THandleDeepLink(string url): Task<bool?>Hooks can be passed to initialization and programmatic survey/message starts. Callback payloads are forwarded as JSON strings by the mobile wrappers.
var hooks = new ScreebHooks{ Version = "1.0.0", Callbacks = { ["onSurveyShowed"] = async payload => { // handle hook payload return null; }, },};For complete hook payload definitions, see the JS tag hooks reference.
Privacy helpers
Section titled “Privacy helpers”entry.ScreebMaskText();
view.ScreebNoCapture();
button.ScreebId("checkout-button");Type definitions
Section titled “Type definitions”public class ScreebHooks{ /// <summary>Hooks version identifier passed verbatim to the native SDK.</summary> public required string Version { get; set; }
/// <summary> /// Hook callbacks: key = hook name (e.g. "onSurveyShowed"), /// value = async callback receiving the JSON payload string. /// </summary> public Dictionary<string, Func<string, Task<object?>>> Callbacks { get; set; } = new();}
public class ScreebInitOptions{ public bool IsDebugMode { get; set; } = false; public bool DisableMirror { get; set; } = false;}