Stay organized with collections
Save and categorize content based on your preferences.
DomainVerificationManager
class DomainVerificationManager
System service to access domain verification APIs. Applications should use getDomainVerificationUserState(java.lang.String)
if necessary to check if/how they are verified for a domain, which is required starting from platform android.os.Build.VERSION_CODES#S
in order to open Intent
s which declare Intent.CATEGORY_BROWSABLE
or no category and also match against Intent.CATEGORY_DEFAULT
android.content.IntentFilter
s, either through an explicit declaration of Intent.CATEGORY_DEFAULT
or through the use of android.content.pm.PackageManager#MATCH_DEFAULT_ONLY
, which is usually added for the caller when using Context.startActivity(Intent)
and similar.
Restricted for SDK Runtime environment in API level 34.
Summary
Public methods
getDomainVerificationUserState
fun getDomainVerificationUserState(packageName: String): DomainVerificationUserState?
Retrieve the user state for the given package and the Context
's user.
Parameters |
packageName |
String: The app to query state for. This value cannot be null . |
Return |
DomainVerificationUserState? |
The user selection verification data for the given package for the user, or null if the package does not declare any HTTP/HTTPS domains. |
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-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# DomainVerificationManager\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDomainVerificationManager\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/content/pm/verify/domain/DomainVerificationManager \"View this page in Java\") \n\n```\nclass DomainVerificationManager\n```\n\n|---|-----------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.content.pm.verify.domain.DomainVerificationManager](#) |\n\nSystem service to access domain verification APIs. Applications should use [getDomainVerificationUserState(java.lang.String)](#getDomainVerificationUserState(kotlin.String)) if necessary to check if/how they are verified for a domain, which is required starting from platform [android.os.Build.VERSION_CODES#S](../../../../os/Build.VERSION_CODES.html#S:kotlin.Int) in order to open [Intent](../../../Intent.html#)s which declare [Intent.CATEGORY_BROWSABLE](../../../Intent.html#CATEGORY_BROWSABLE:kotlin.String) or no category and also match against [Intent.CATEGORY_DEFAULT](../../../Intent.html#CATEGORY_DEFAULT:kotlin.String) [android.content.IntentFilter](../../../IntentFilter.html#)s, either through an explicit declaration of [Intent.CATEGORY_DEFAULT](../../../Intent.html#CATEGORY_DEFAULT:kotlin.String) or through the use of [android.content.pm.PackageManager#MATCH_DEFAULT_ONLY](../../PackageManager.html#MATCH_DEFAULT_ONLY:kotlin.Int), which is usually added for the caller when using [Context.startActivity(Intent)](../../../Context.html#startActivity(android.content.Intent)) and similar. \nRestricted for SDK Runtime environment in API level 34.\n\nSummary\n-------\n\n| Public methods ||\n|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DomainVerificationUserState](/reference/kotlin/android/content/pm/verify/domain/DomainVerificationUserState)? | [getDomainVerificationUserState](#getDomainVerificationUserState(kotlin.String))`(`packageName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Retrieve the user state for the given package and the [Context](../../../Context.html#)'s user. |\n\nPublic methods\n--------------\n\n### getDomainVerificationUserState\n\nAdded in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getDomainVerificationUserState(packageName: String): DomainVerificationUserState?\n```\n\nRetrieve the user state for the given package and the [Context](../../../Context.html#)'s user.\n\n| Parameters ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `packageName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The app to query state for. This value cannot be `null`. |\n\n| Return ||\n|----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| [DomainVerificationUserState](/reference/kotlin/android/content/pm/verify/domain/DomainVerificationUserState)? | The user selection verification data for the given package for the user, or null if the package does not declare any HTTP/HTTPS domains. |"]]