Xamarin developer API Android

Last updated:

This article describes the Pendo Xamarin SDK Public APIs for Android.

Note: The information here is relevant for SDK versions lower than 3.0. For API documentation for the latest Pendo SDK versions and information about the integration process, refer to our GitHub.

Pendo Class Public API - SDK Version 2.10+

Return type

Public API method C# 

Description

Void

Setup (Application app, string appKey, PendoOptions options, IPendoPhasesCallbackInterface pendoPhasesCallback)

Initializes the Pendo SDK. Call this API in OnCreate.

This API should be used instead of initSDK and initSDKWithoutVisitor that will be deprecated in future versions. 

Void

StartSession (string visitorId, string accountId, IDictionary<string, Java.Lang.Object> visitorData, IDictionary<string, Java.Lang.Object> accountData)

Starts mobile session with provided visitor and account information. If a session is already in progress, the session will end and a new session will start.

To generate an anonymous visitor, pass null as the visitorId.

This API should be used instead of switchVisitor that will be deprecated in future versions. 

Must be called after the SDK was initialized.

Void

EndSession()

Ends the active session and stops collecting analytics or show guides to the user. More details here.

Must be called after the SDK was initialized.

Void

ClearVisitor()

Ends the active session starts a new session with an anonymous visitor.

Must be called after the SDK was initialized.

Void

SetVisitorData (IDictionary<string, Java.Lang.Object> visitorData)
 

Update the visitor metadata. 

Must be called after the SDK was initialized.

Void

SetAccountData (IDictionary<string, Java.Lang.Object> accountData)

Update the account metadata

Must be called after the SDK was initialized.

String

GetVisitorId()

Returns the ID of the visitor in the active session. 

 

String

GetAccountId()

 

Returns the ID for the account in the active session. 

 

Void

AccountId

Property: Sets the ID for the account in the active session. 

Void

Track (string eventName, NSDictionary? @params)

Sends a track event with the specified properties.

Must be called after the SDK was initialized.

Void

DismissVisibleGuides()

Dismisses all visible guide.

Void

PauseGuides (bool dismissGuides)
 

Pauses any guides from showing during an active session. If dismissGuides is TRUE then all visible guides will be dismissed.

Must be called after the SDK was initialized.

Void

ResumeGuides()

Resumes showing guides during the active session. Should only be used after pauseGuides. 

Must be called after the SDK was initialized.

String

GetDeviceId()

Returns the device's unique Pendo-generated id. The device id is used by Pendo to generate a unique id for each anonymous visitor. This id is unique per application.

 

Void

SendClickAnalytic(Android.Views.View view)

Sends RAClick analytics for any view. Use when Pendo does not automatically recognize clickable features.

View must be set as 'clickable=true' .

API should be called in the same place the element’s action implemented upon click. (OnTouch)

Must happen after startSession has been called.

 

Pendo Class Public APIs - SDK Version 2.9 and lower 

Return type

Public API method C#

Description

Void

InitSDK (string appKey, PendoInitParams? initParams)
 

Initializes the Pendo SDK using the specified app key and params.

Void

InitSDKWithoutVisitor (string appKey)
 
 

Initializes the Pendo SDK without visitor and account data, using the specified app key.

Void

SwitchVisitor (string? visitorId, string? accountId, NSDictionary? visitorData, NSDictionary? accountData)
 

Ends the current session when there is an active session then starts a new session with the new visitor and account information. 

Passing nil as the visitorId will generate an anonymous visitor id. 

Must be called after the SDK was initialized.

 

Was this article helpful?
0 out of 0 found this helpful