UserAgentMetadata
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 |
|---|
|
Class that holds brand name, major version and full version. |
|
Builder used to create |
|
Builder used to create |
Constants |
|
|---|---|
const Int |
BITNESS_DEFAULT = 0Use this value for bitness to use the platform's default bitness value, which is an empty string for Android WebView. |
Public functions |
|
|---|---|
Boolean |
Two UserAgentMetadata objects are equal only if all the metadata values are equal. |
String? |
Returns the value for the |
Int |
Returns the value for the |
(Mutable)List<UserAgentMetadata.BrandVersion!> |
Returns the current list of user-agent brand versions which are used to populate user-agent client hints |
String? |
Returns the value for the |
String? |
getModel()Returns the value for the |
String? |
Returns the value for the |
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
const val BITNESS_DEFAULT = 0: Int
Use this value for bitness to use the platform's default bitness value, which is an empty string for Android WebView.
Public functions
equals
fun equals(o: Any!): Boolean
Two UserAgentMetadata objects are equal only if all the metadata values are equal.
getArchitecture
fun getArchitecture(): String?
Returns the value for the sec-ch-ua-arch client hint.
| See also | |
|---|---|
setArchitecture |
getBitness
fun getBitness(): Int
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
fun getBrandVersionList(): (Mutable)List<UserAgentMetadata.BrandVersion!>
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
fun getFullVersion(): String?
Returns the value for the sec-ch-ua-full-version client hint.
| See also | |
|---|---|
setFullVersion |
getModel
fun getModel(): String?
Returns the value for the sec-ch-ua-model client hint.
| See also | |
|---|---|
setModel |
getPlatform
fun getPlatform(): String?
Returns the value for the sec-ch-ua-platform client hint.
| See also | |
|---|---|
setPlatform |
getPlatformVersion
fun getPlatformVersion(): String?
Returns the value for the sec-ch-ua-platform-version client hint.
| Returns | |
|---|---|
String? |
Platform version string. |
| See also | |
|---|---|
setPlatformVersion |