3. Call the APIs

This page guides you through the Mobile SDK APIs you can utilize to help you retrieve envelopes more efficiently.

You can also check the envelope settings in Console to see the refresh time, enable logging mode, and others. See our Console documentation on Implementing ATS Mobile SDK to learn more.

Methods

getEnvelope

This method returns an envelope for the specified identifier. Phone numbers as identifiers are only supported in the U.S.

❗️

LRCustomerID not available for all publishers

Due to the complexity of the customer ID mapping process, LRCustomerID is only available for selected publishers who must go through an extensive onboarding process. Please note that you cannot use this API out-of-the-box.

Name

Type

Description

id

LREmailIdentifier
LREmailIdentifier(email: String)
LREmailIdentifier(sha1: String, sha256: String, md5: String)

LRPhoneIdentifier (U.S. only)
LRPhoneIdentifier(phoneNumber: String)
LRPhoneIdentifier(sha1: String)

LRCustomerID (Not available for all publishers)
LRCustomerId(customerId: Int)
LRCustomerId(sha1: String, sha256: String, md5: String)

Non-hashed or hashed identifier for which you are requesting envelope

callback

LREnvelopeCallback
fun invoke(envelope: Envelope?, error: LRError?)

Instance of a callback which returns the result.

Returns
No return parameter

getSdkStatus

This method returns the current SDK state.

Returns
SDK status.

setAtsManagerCallback

This method sets callback for ATS Manager that is used for receiving events.

Parameters

Name

Type

Description

eventsCallback

LRAtsManagerCallback

The instance of callback used for event delegation.

Returns
No return parameter.

removeAtsManagerCallback

This method removes callback for ATS Manager that is used for receiving events.

Parameters
No parameter

Returns
No return parameter

isDisabled

Sets flag for disabling or enabling SDK. Enabling is only possible after the SDK was previously disabled.

Parameters

Name

Type

Description

sdkDisable

Boolean

Flag used for disabling or enabling SDK.

Returns
No return parameter

resetSdk - Not available

This method resets SDK to its initial state.

Parameters
No parameter

Returns
No return parameter

getSdkVersion

This method returns current version of the SDK.

Parameters
No parameter

Returns
String


What’s Next

Learn about the events exposed by the SDK