AdDebugRecorder

Opt-in recorder for the debug console's event stream.

Install it at AdManager construction in debug builds so the buffer is live before the first ad request — otherwise SDK initialization, consent gathering and cold-start app-open events have already passed by the time the screen opens.

if (isDebugBuild()) AdDebugRecorder.install(adManager, appScope)

Not installed in release builds, the recorder costs nothing: no collector runs and the buffer stays empty.

Properties

Link copied to clipboard
const val DEFAULT_CAPACITY: Int = 500

Events retained before oldest-first eviction begins.

Functions

Link copied to clipboard
fun install(manager: AdManager, scope: CoroutineScope, capacity: Int = DEFAULT_CAPACITY)

Subscribes to manager's event stream and retains the most recent capacity events. Installing twice replaces the previous subscription and clears the buffer.

Link copied to clipboard
fun uninstall()

Cancels the subscription and clears the buffer.