Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for creating AppInstallFilters
objects.
Summary
Public constructors
Public methods
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-02-10 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-02-10 UTC."],[],[],null,["# AppInstallFilters.Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 12](https://developer.android.com/sdkExtensions)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/adservices/common/AppInstallFilters.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|----------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.adservices.common.AppInstallFilters.Builder](#) |\n\nBuilder for creating [AppInstallFilters](/reference/kotlin/android/adservices/common/AppInstallFilters) objects.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Builder](#Builder())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AppInstallFilters](/reference/kotlin/android/adservices/common/AppInstallFilters) | [build](#build())`()` Builds and returns a [AppInstallFilters](/reference/kotlin/android/adservices/common/AppInstallFilters) instance. |\n| [AppInstallFilters.Builder](#) | [setPackageNames](#setPackageNames(kotlin.collections.MutableSet))`(`packageNames:` `[MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\u003e`)` Gets the list of package names this ad is filtered on. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 12](https://developer.android.com/sdkExtensions) \n\n```\nBuilder()\n```\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 12](https://developer.android.com/sdkExtensions) \n\n```\nfun build(): AppInstallFilters\n```\n\nBuilds and returns a [AppInstallFilters](/reference/kotlin/android/adservices/common/AppInstallFilters) instance.\n\n| Return ||\n|------------------------------------------------------------------------------------|------------------------------|\n| [AppInstallFilters](/reference/kotlin/android/adservices/common/AppInstallFilters) | This value cannot be `null`. |\n\n### setPackageNames\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nAlso in [Ad Services Extensions 12](https://developer.android.com/sdkExtensions) \n\n```\nfun setPackageNames(packageNames: MutableSet\u003cString!\u003e): AppInstallFilters.Builder\n```\n\nGets the list of package names this ad is filtered on.\n\nSee [getPackageNames()](/reference/kotlin/android/adservices/common/AppInstallFilters#getPackageNames()) for more information.\n\n| Parameters ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageNames` | [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)\\\u003c[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!\\\u003e: This value cannot be `null`. |\n\n| Return ||\n|--------------------------------|------------------------------|\n| [AppInstallFilters.Builder](#) | This value cannot be `null`. |"]]