Stay organized with collections
Save and categorize content based on your preferences.
DomainVerificationManager
public
final
class
DomainVerificationManager
extends Object
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
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
IntentFilter
s, either through an
explicit declaration of Intent.CATEGORY_DEFAULT
or through the use of
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
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public methods
getDomainVerificationUserState
public DomainVerificationUserState getDomainVerificationUserState (String packageName)
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 . |
Returns |
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nDomainVerificationManager\n=========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/content/pm/verify/domain/DomainVerificationManager \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\nfinal\n\nclass\nDomainVerificationManager\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|------------------------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.content.pm.verify.domain.DomainVerificationManager |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSystem service to access domain verification APIs.\n\nApplications should use [getDomainVerificationUserState(java.lang.String)](/reference/android/content/pm/verify/domain/DomainVerificationManager#getDomainVerificationUserState(java.lang.String)) if necessary to\ncheck if/how they are verified for a domain, which is required starting from platform\n[Build.VERSION_CODES.S](/reference/android/os/Build.VERSION_CODES#S) in order to open [Intent](/reference/android/content/Intent)s which declare\n[Intent.CATEGORY_BROWSABLE](/reference/android/content/Intent#CATEGORY_BROWSABLE) or no category and also match against\n[Intent.CATEGORY_DEFAULT](/reference/android/content/Intent#CATEGORY_DEFAULT) [IntentFilter](/reference/android/content/IntentFilter)s, either through an\nexplicit declaration of [Intent.CATEGORY_DEFAULT](/reference/android/content/Intent#CATEGORY_DEFAULT) or through the use of\n[PackageManager.MATCH_DEFAULT_ONLY](/reference/android/content/pm/PackageManager#MATCH_DEFAULT_ONLY), which is usually added for the\ncaller when using [Context.startActivity(Intent)](/reference/android/content/Context#startActivity(android.content.Intent)) and similar.\n\n\u003cbr /\u003e\n\n\nRestricted for SDK Runtime environment in API level 34.\n\nSummary\n-------\n\n| ### Public methods ||\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[DomainVerificationUserState](/reference/android/content/pm/verify/domain/DomainVerificationUserState) | ` `[getDomainVerificationUserState](/reference/android/content/pm/verify/domain/DomainVerificationManager#getDomainVerificationUserState(java.lang.String))`(`[String](/reference/java/lang/String)` packageName) ` Retrieve the user state for the given package and the [Context](/reference/android/content/Context)'s user. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic methods\n--------------\n\n### getDomainVerificationUserState\n\nAdded in [API level 31](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic DomainVerificationUserState getDomainVerificationUserState (String packageName)\n```\n\nRetrieve the user state for the given package and the [Context](/reference/android/content/Context)'s user.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|---------------------------------------------------------------------------|\n| `packageName` | `String`: The app to query state for. This value cannot be `null`. \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DomainVerificationUserState](/reference/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. \u003cbr /\u003e |\n\n| Throws ||\n|------------------------------------------------------------------------------------------------------------|---|\n| [PackageManager.NameNotFoundException](/reference/android/content/pm/PackageManager.NameNotFoundException) | |"]]