Skip to main content

Programmatic Access Library (PAL)

The Programmatic Access Library (PAL) is a lightweight SDK that provide discrete access to targeting signals for Google Ad Manager programmatic ads.

Configuration

AttributeTypeRequiredDescription
enabledBooleanNoEnable the plugin (Defaults to false if no value is given.)
allowStorageConsentBooleanNoWhether PAL has purpose 1 consent to use identifiers and storage. The value needs to be determined by integrating with CMP (Consent Management Provider). This is set to false by default. If specified as true, PAL has consent from the user to use information like cookies, device IDs and advertising IDs. This value needs to be set to be IAB TCFv2 (Transparency and Consent Framework) compliant. (Defaults to false)
ppidStringNoThe publisher provided identifier. (Defaults to empty string)
descriptionUrlStringNoThe description URL of the content during which the ad will be played. (Defaults to the url that the video is playing)
Gradle dependencies
dependencies {
implementation 'com.google.android.gms:play-services-pal:20.1.0'
}

Example

val luraConfiguration = LuraConfiguration(
plugins = LuraPluginsConfigurations(
pal = PalConfiguration(
enabled = true,
allowStorageConsent = true,
ppid = "12DJD92J02KXVLS9D817DCJ078S8F1J2",
descriptionUrl = "https://docs4.lura.app/",
)
)
)

playerView = findViewById(R.id.lura_player_view)
player = LuraPlayer(context = this, playerView = playerView)
player.setConfig(luraConfiguration)

Using the PAL Nonce

LuraPlayer automatically fills the reserved macro LURA_PAL_NONCE in URL's under the ads parameter. Check out macros for more details.