Utility Methods

Methods that enrich the SDKs abilities and data collected.

SDK Methods

Below each method you will see a brief description as well as a code example for each of the supported platform/frameworks. If you do not see a command example in a specific language/platform then the command is not available or not relevant for that platform.

setScreenName

Set the current Screen Name.

ParametersType
ScreenNameString
Returns
Void
NeuroID.setScreenName("myScreenName")
NeuroID.getInstance()?.setScreenName("myScreenName")
await NeuroID.setScreenName("myScreenName")

enableLogging

Alters the printing behavior of debug logs (regardless of Prod/Test environment or debug/release SDK build). Default behavior is set to true.

ParametersType
enableLogsBoolean
Returns
Void

Note: Info and error logs will print regardless.

NeuroID.enableLogging(true)
NeuroID.enableLogging(false)
NeuroID.getInstance()?.enableLogging(true)
NeuroID.getInstance()?.enableLogging(false)
await NeuroID.enableLogging(true);
await NeuroID.enableLogging(false);

attemptedLogin

Mark a login attempt with an optional identifier.

ParametersType
attemptedRegisteredUserIdString?
Returns
Void
NeuroID.attemptedLogin("myLoginID")

// Identifier Not Required
NeuroID.attemptedLogin()
NeuroID.getInstance()?.attemptedLogin("myLoginID")

// Identifier Not Required
NeuroID.getInstance()?.attemptedLogin()
await NeuroID.attemptedLogin("myLoginID")

// Identifier Not Required
await NeuroID.attemptedLogin()

setVariable

Captures a custom variable and value.

ParametersType
KeyString
ValueString
Returns
Void

Returns: Void

NeuroID.setVariable("myKey", "myValue")
NeuroID.getInstance()?.setVariable("myKey", "myValue")
await NeuroID.setVariable("myKey", "myValue")

excludeViewByTestID

Restrict event capturing on a specific target by ID.

ParametersType
ExcludedViewIDString
Returns
Void

Returns: Void

NeuroID.excludeViewByTestID("myExcludedViewTestID")
NeuroID.getInstance()?.excludeViewByTestID("myExcludedViewTestID")
await NeuroID.excludeViewByTestID("myExcludedViewTestID");

getClientID

Retrieve the current ClientID.

Returns
String
NeuroID.getClientID()
NeuroID.getInstance()?.getClientID()
await NeuroID.getClientID()

getEnvironment

Retrieve the current Environment.

Returns
String
NeuroID.getEnvironment()
NeuroID.getInstance()?.getEnvironment()
await NeuroID.getEnvironment()

getSDKVersion

Retrieve the current SDK Version.

Returns
String
NeuroID.getSDKVersion()
NeuroID.getInstance()?.getSDKVersion()
await NeuroID.getSDKVersion()

getScreenName

Retrieve the current Screen Name.

Returns
String?
NeuroID.getScreenName()
NeuroID.getInstance()?.getScreenName()
await NeuroID.getScreenName()

getSessionID

Retrieve the current SessionID.

Returns
String
NeuroID.getSessionID()
NeuroID.getInstance()?.getSessionID()
await NeuroID.getSessionID()

getUserID

Retrieve the current UserID.

Returns
String
NeuroID.getUserID()
NeuroID.getInstance()?.getUserID()
await NeuroID.getUserID()

getRegisteredUserID

Retrieve the current RegisteredUserID.

Returns
String
NeuroID.getRegisteredUserID()
NeuroID.getInstance()?.getRegisteredUserID()
await NeuroID.getRegisteredUserID()

isStopped

Check if the SDK is stopped/started.

Returns
Boolean
NeuroID.isStopped()
NeuroID.getInstance()?.isStopped()
await NeuroID.isStopped()

printIntegrationHealthInstruction

Reprint the Integration Health Report access instructions.

Returns
Void and logs instructions to console.
NeuroID.printIntegrationHealthInstruction()
NeuroID.getInstance()?.printIntegrationHealthInstruction()

What’s Next