Android Methods for LRAtsMediationAdapter
View all available methods and properties for Android when implementing LRAtsMediationAdapter
The LRAtsMediationAdapter class allows Google's AdMob SDK to collect signals from our ATS library through a specified method. When AdMob SDK is initialized from your application, through reflection and with instructions from the configuration file, it will call the ATS library and the methods mapped in the adapter.
If your ATS placement is enabled for Google SSP and Google envelope is detected, the collect signal call returns a Google-permissioned envelope. If not, it will return an ATS envelope.
import com.liveramp.ats.LRAtsMediationAdapter
LRAtsMediationAdapter.setIdentifier(LREmailIdentifier(email = "<#email#>"))
LRAtsMediationAdapter.configure(LRAtsConfiguration(configID = "<#your config id#>"))
// optional
// LRAtsMediationAdapter.setHasConsentForNoLegislation(true)
To learn how to implement LRAtsMediationAdapter with Google Secure Signals, see "Generate and Pass Identity Envelopes with Google Secure Signals Adapter".
For SDK v3.0.0 and Above
If you are running the ATS Mobile SDK v3.0.0 and later, you don't need to perform any of the instructions and methods in this article. All required configurations to pass Google envelopes are set up out-of-the-box in these SDK versions.
Initialize the LRAtsSDK as feasibly as possible, and retrieve an envelope by calling getEnvelope. An identity envelope will automatically be included in your ad requests if LiveRamp is enabled as a secure signals partner. See the prerequisites to learn more.
To check which SDK version you are running, call getSdkVersion.
Methods
Deprecated for v3.0.0
The methods in this article are deprecated for v3.0.0 and later, since all configurations are automatically set up in these versions.
The methods below are only applicable for Android SDK v2.10 and below.
configure(LRAtsConfiguration atsConfiguration)
This method sets the configurationId to use during the adapter's initialization phase afterward.
Parameters
| Name | Type | Description |
|---|---|---|
atsConfiguration | LRAtsConfiguration LRAtsConfiguration(String configID) | The class used to configure LRAtsSDK during initialization. |
Returns
No return parameter
setHasConsentForNoLegislation(Boolean hasConsent)
Sets consent flags for countries that are not under GDPR or CCPA legislation.
Parameters
| Name | Type | Description |
|---|---|---|
hasConsentForNoLegislation | Boolean | Edits consent flag if not subject to GDPR or CCPA. |
Returns
No return parameter
hasConsentForNoLegislation()
Returns a consent flag for countries not found in any geo-targeting legislation configured in Console. If set to true, the SDK will proceed even if there is no legislation.
Default value is false.
Parameters
No parameter
Returns
Boolean
setIdentifier(LRIdentifierData identifier)
This method sets the identifier which will be used during the collectSignals phase afterward.
| Name | Type | Description |
|---|---|---|
| Identifier | LREmailIdentifier LREmailIdentifier(email: String) LREmailIdentifier(sha1: String?, sha256: String?, md5: String?) LRPhoneIdentifier (E.164 phone format) LRPhoneIdentifier(phoneNumber: String) LRPhoneIdentifier(sha1: String) LRCustomIdentifier LRCustomIdentifier(customId: String) LRDealIdentifier LRDealIdentifier(email: String) LRDealIdentifier(sha256: String) LREnvelopeIdentifier LREnvelopeIdentifier(envelope: String) | The class used to set identifiers to collect signals afterward. |
Returns
No return parameter
Updated 10 months ago