-
public final class EloAdOne ad ready to render.
An
EloAdis a showing, not a creative. The same creative can win repeatedly for the same user, and each win is a separate ad opportunity with its own tracking. id is that opportunity and is what impression dedup and analytics correlate on; creativeId is the artwork it happened to serve.The tracker is attached when the ad is loaded and owns render / impression telemetry plus click lifecycle behavior. Elo-direct clicks currently notify the publisher locally without a client-side click POST. The SDK never reads tracking fields directly — it calls tracker methods.
The optional renderer marks a renderer-backed creative: one whose view must be registered to count impressions and clicks. When present, the SDK's Compose ad views embed the renderer's view via
AndroidView { ... }instead of rendering Elo-styled chrome.clickUrl is exposed (still
internal) for the view layer to launch the destination in a browser viaIntent.ACTION_VIEW.Only the loader attaches a real tracker. It lives in the private handle, so no generated
copyorcomponentNfunction (callable from Java) can reuse a loaded ad's tracker under a new id. The public constructor builds a display-only ad that sends nothing.Mirrors iOS
EloAd.
-
-
Method Summary
Modifier and Type Method Description final StringgetId()The ad opportunity this showing belongs to (ad response request_id).final StringgetCreativeId()The creative that filled this opportunity (ad response ad_id).final StringgetTitle()final StringgetDescription()final StringgetImageUrl()final StringgetCtaText()Call-to-action label supplied by the creative (ad response cta_text), e.g.final UnitreleaseResources()Release the resources tied to this ad. -
-
Method Detail
-
getId
final String getId()
The ad opportunity this showing belongs to (ad response
request_id).Render, impression, and click URLs are keyed under this id server-side, so it is what correlates a confirmed impression to its funnel row and what render/impression dedup keys on. Carried through to the impression debug event (
EloDebugEvent.TrackingAttempted.serverRequestId).Unique per fill, not per creative. Mirrors iOS
EloAd.id.
-
getCreativeId
final String getCreativeId()
The creative that filled this opportunity (ad response
ad_id).Stable across opportunities — the same creative is served to the same user many times. Use it to recognize a creative, never to identify a showing, which is id. Deduping on this instead silenced every showing of a creative after the first, so those opportunities recorded a click with no render and no impression (ENG-375), and suppressed a repeat creative's thumbnail after one failed image load (ENG-397). Mirrors iOS
EloAd.creativeId.
-
getDescription
final String getDescription()
-
getImageUrl
final String getImageUrl()
-
getCtaText
final String getCtaText()
Call-to-action label supplied by the creative (ad response
cta_text), e.g."Learn more". When non-blank both layouts draw it as a pill in the trailing slot instead of the disclosure chevron; on the inline banner that pill is also the only click target. Mirrors iOSEloAd.ctaText.
-
releaseResources
final Unit releaseResources()
Release the resources tied to this ad. Call this only when you've decided not to render the ad — e.g. you compared the Elo result against another network in your own code and chose the other one, so the EloAd you received from
Elo.loadAdwill never reach anEloAdView.Renderer-backed creatives hold view resources that get released here. For Elo-rendered creatives this is a no-op. Safe to call more than once.
Do not call this on an ad you've passed to
EloAdView— the SDK releases expired preloads itself, and the view layer keeps a displayed ad alive as long as it's on screen.Named for parity with iOS
EloAd.releaseResources().
-
-
-
-