Stay organized with collections
Save and categorize content based on your preferences.
TvAdServiceCallback
abstract class TvAdServiceCallback
Callback used to monitor status of the TV advertisement service.
Summary
Public methods |
open Unit |
This is called when a TV AD service is added to the system.
|
open Unit |
This is called when a TV AD service is removed from the system.
|
open Unit |
This is called when a TV AD service is updated on the system.
|
Public constructors
TvAdServiceCallback
TvAdServiceCallback()
Public methods
onAdServiceAdded
open fun onAdServiceAdded(serviceId: String): Unit
This is called when a TV AD service is added to the system.
Normally it happens when the user installs a new TV AD service package that implements TvAdService
interface.
Parameters |
serviceId |
String: The ID of the TV AD service. This value cannot be null . |
onAdServiceRemoved
open fun onAdServiceRemoved(serviceId: String): Unit
This is called when a TV AD service is removed from the system.
Normally it happens when the user uninstalls the previously installed TV AD service package.
Parameters |
serviceId |
String: The ID of the TV AD service. This value cannot be null . |
onAdServiceUpdated
open fun onAdServiceUpdated(serviceId: String): Unit
This is called when a TV AD service is updated on the system.
Normally it happens when a previously installed TV AD service package is re-installed or a newer version of the package exists becomes available/unavailable.
Parameters |
serviceId |
String: The ID of the TV AD service. This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# TvAdManager.TvAdServiceCallback\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTvAdServiceCallback\n===================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/tv/ad/TvAdManager.TvAdServiceCallback \"View this page in Java\") \n\n```\nabstract class TvAdServiceCallback\n```\n\n|---|----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.tv.ad.TvAdManager.TvAdServiceCallback](#) |\n\nCallback used to monitor status of the TV advertisement service.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------|---|\n| [TvAdServiceCallback](#TvAdServiceCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAdServiceAdded](#onAdServiceAdded(kotlin.String))`(`serviceId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` This is called when a TV AD service is added to the system. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAdServiceRemoved](#onAdServiceRemoved(kotlin.String))`(`serviceId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` This is called when a TV AD service is removed from the system. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAdServiceUpdated](#onAdServiceUpdated(kotlin.String))`(`serviceId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` This is called when a TV AD service is updated on the system. |\n\nPublic constructors\n-------------------\n\n### TvAdServiceCallback\n\n```\nTvAdServiceCallback()\n```\n\nPublic methods\n--------------\n\n### onAdServiceAdded\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onAdServiceAdded(serviceId: String): Unit\n```\n\nThis is called when a TV AD service is added to the system.\n\nNormally it happens when the user installs a new TV AD service package that implements [TvAdService](/reference/kotlin/android/media/tv/ad/TvAdService) interface.\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `serviceId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The ID of the TV AD service. This value cannot be `null`. |\n\n### onAdServiceRemoved\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onAdServiceRemoved(serviceId: String): Unit\n```\n\nThis is called when a TV AD service is removed from the system.\n\nNormally it happens when the user uninstalls the previously installed TV AD service package.\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `serviceId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The ID of the TV AD service. This value cannot be `null`. |\n\n### onAdServiceUpdated\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onAdServiceUpdated(serviceId: String): Unit\n```\n\nThis is called when a TV AD service is updated on the system.\n\nNormally it happens when a previously installed TV AD service package is re-installed or a newer version of the package exists becomes available/unavailable.\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `serviceId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The ID of the TV AD service. This value cannot be `null`. |"]]