UserAgentMetadata
public final class UserAgentMetadata
Holds user-agent metadata information and uses to generate user-agent client hints.
This class is functionally equivalent to UADataValues.
Summary
Nested types |
---|
public final class UserAgentMetadata.BrandVersion Class that holds brand name, major version and full version. |
public final class UserAgentMetadata.BrandVersion.Builder Builder used to create |
public final class UserAgentMetadata.Builder Builder used to create |
Constants |
|
---|---|
static final int |
BITNESS_DEFAULT = 0 Use this value for bitness to use the platform's default bitness value, which is an empty string for Android WebView. |
Public methods |
|
---|---|
boolean |
Two UserAgentMetadata objects are equal only if all the metadata values are equal. |
@Nullable String |
Returns the value for the |
int |
Returns the value for the |
@NonNull List<UserAgentMetadata.BrandVersion> |
Returns the current list of user-agent brand versions which are used to populate user-agent client hints |
@Nullable String |
Returns the value for the |
@Nullable String |
getModel() Returns the value for the |
@Nullable String |
Returns the value for the |
@Nullable String |
Returns the value for the |
int |
hashCode() |
boolean |
isMobile() Returns the value for the |
boolean |
isWow64() Returns the value for the |
Constants
BITNESS_DEFAULT
public static final int BITNESS_DEFAULT = 0
Use this value for bitness to use the platform's default bitness value, which is an empty string for Android WebView.
Public methods
equals
public boolean equals(Object o)
Two UserAgentMetadata objects are equal only if all the metadata values are equal.
getArchitecture
public @Nullable String getArchitecture()
Returns the value for the sec-ch-ua-arch
client hint.
See also | |
---|---|
setArchitecture |
getBitness
public int getBitness()
Returns the value for the sec-ch-ua-bitness
client hint.
Returns | |
---|---|
int |
An integer indicates the CPU bitness, the integer value will convert to string when generating the user-agent client hint, and |
See also | |
---|---|
setBitness |
getBrandVersionList
public @NonNull List<UserAgentMetadata.BrandVersion> getBrandVersionList()
Returns the current list of user-agent brand versions which are used to populate user-agent client hints sec-ch-ua
and sec-ch-ua-full-version-list
. Each BrandVersion
object holds the brand name, brand major version and brand full version.
See also | |
---|---|
setBrandVersionList |
getFullVersion
public @Nullable String getFullVersion()
Returns the value for the sec-ch-ua-full-version
client hint.
See also | |
---|---|
setFullVersion |
getModel
public @Nullable String getModel()
Returns the value for the sec-ch-ua-model
client hint.
See also | |
---|---|
setModel |
getPlatform
public @Nullable String getPlatform()
Returns the value for the sec-ch-ua-platform
client hint.
See also | |
---|---|
setPlatform |
getPlatformVersion
public @Nullable String getPlatformVersion()
Returns the value for the sec-ch-ua-platform-version
client hint.
See also | |
---|---|
setPlatformVersion |