Stay organized with collections
Save and categorize content based on your preferences.
ClientInfo
class
ClientInfo
Direct use of ClientInfo
is not supported.
Information about the client package that is using DTDI.
Summary
<init>
( originatingPackageName
:
String
, clientPackageVersion
:
String
, clientPackageBuildType
:
Int
, dtdiSdkVersionCode
:
String
, receivingPackageHash
:
String
?
=
null)
Direct use of ClientInfo
is not supported.
Builds a ClientInfo
for an alternative package in a cross app experience.
Version of the package using DTDI.
Version code of the DTDI SDK.
Name of the package using DTDI.
The first byte of SHA256 of the alternative package name.
Public constructors
<init>
ClientInfo
(
originatingPackageName
:
String
,
clientPackageVersion
:
String
,
clientPackageBuildType
:
Int
,
dtdiSdkVersionCode
:
String
,
receivingPackageHash
:
String
?
=
null )
Direct use of ClientInfo
is not supported.
Information about the client package that is using DTDI.
Properties
clientPackageBuildType
val
clientPackageBuildType
:
Int
BuildType
of the package using DTDI. Set to Int to resolve compiler issue
clientPackageVersion
val
clientPackageVersion
:
String
Version of the package using DTDI.
dtdiSdkVersionCode
val
dtdiSdkVersionCode
:
String
Version code of the DTDI SDK.
originatingPackageName
val
originatingPackageName
:
String
Name of the package using DTDI.
receivingPackageHash
val
receivingPackageHash
:
String
?
The first byte of SHA256 of the alternative package name. Only set on the receiving device
during a cross app experience.
Companion functions
fromAltPackageName
fun
fromAltPackageName
(
context
:
Context
,
originatingPackage
:
String
,
altPackage
:
String
)
:
ClientInfo
?
Builds a ClientInfo
for an alternative package in a cross app experience.
name of the package that initialates the experience.
name of the alternative package on the other side of cross app channel.
fromPackageName
fun
fromPackageName
(
context
:
Context
,
packageName
:
String
?
)
:
ClientInfo
?
Builds a ClientInfo
for a specific package name. Within an SDK, the packageName is the
packageName of the application using the SDK. Within Google Play services, the packageName is the callingPackage
and not the package name of Google Play services.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 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 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eClientInfo\u003c/code\u003e stores information about the client package using DTDI, including package name, version, build type, and DTDI SDK version.\u003c/p\u003e\n"],["\u003cp\u003eDirect use of the \u003ccode\u003eClientInfo\u003c/code\u003e class is not supported; instead, use the provided companion functions like \u003ccode\u003efromPackageName\u003c/code\u003e and \u003ccode\u003efromAltPackageName\u003c/code\u003e to build instances.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003efromPackageName\u003c/code\u003e function builds a \u003ccode\u003eClientInfo\u003c/code\u003e instance for a specific package, while \u003ccode\u003efromAltPackageName\u003c/code\u003e is used for cross-app experiences with alternative packages.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eClientInfo\u003c/code\u003e includes a \u003ccode\u003ereceivingPackageHash\u003c/code\u003e field specifically for identifying the receiving end in cross-app scenarios.\u003c/p\u003e\n"]]],[],null,["# ClientInfo\n==========\n\n```\nclass ClientInfo\n```\n\n|---|-------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [com.google.android.gms.dtdi.analytics.ClientInfo](#) |\n\nDirect use of `ClientInfo` is not supported.\n\nInformation about the client package that is using DTDI.\n\nSummary\n-------\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [\u003cinit\u003e](#%3Cinit%3E(kotlin.String,%20kotlin.String,%20kotlin.Int,%20kotlin.String,%20kotlin.String))`(`originatingPackageName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `clientPackageVersion:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `clientPackageBuildType:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `dtdiSdkVersionCode:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `receivingPackageHash:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?` `=` null)` Direct use of `ClientInfo` is not supported. |\n\n| ### Companion functions ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ClientInfo](#)? | [fromAltPackageName](#Companion.fromAltPackageName(android.content.Context,%20kotlin.String,%20kotlin.String))`(`context:` `[Context](https://developer.android.com/reference/android/content/Context.html)`, `originatingPackage:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `altPackage:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Builds a [ClientInfo](#) for an alternative package in a cross app experience. |\n| [ClientInfo](#)? | [fromPackageName](#Companion.fromPackageName(android.content.Context,%20kotlin.String))`(`context:` `[Context](https://developer.android.com/reference/android/content/Context.html)`, `packageName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` Builds a [ClientInfo](#) for a specific package name. |\n\n| ### Properties ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [clientPackageBuildType](#clientPackageBuildType:kotlin.Int) [BuildType](#) of the package using DTDI. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [clientPackageVersion](#clientPackageVersion:kotlin.String) Version of the package using DTDI. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [dtdiSdkVersionCode](#dtdiSdkVersionCode:kotlin.String) Version code of the DTDI SDK. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [originatingPackageName](#originatingPackageName:kotlin.String) Name of the package using DTDI. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [receivingPackageHash](#receivingPackageHash:kotlin.String) The first byte of SHA256 of the alternative package name. |\n\nPublic constructors\n-------------------\n\n### \\\u003cinit\\\u003e\n\n```\nClientInfo(\n originatingPackageName: String, \n clientPackageVersion: String, \n clientPackageBuildType: Int, \n dtdiSdkVersionCode: String, \n receivingPackageHash: String? = null)\n```\n\nDirect use of `ClientInfo` is not supported.\n\nInformation about the client package that is using DTDI.\n\nProperties\n----------\n\n### clientPackageBuildType\n\n```\nval clientPackageBuildType: Int\n```\n\n[BuildType](#) of the package using DTDI. Set to Int to resolve compiler issue \n\n### clientPackageVersion\n\n```\nval clientPackageVersion: String\n```\n\nVersion of the package using DTDI. \n\n### dtdiSdkVersionCode\n\n```\nval dtdiSdkVersionCode: String\n```\n\nVersion code of the DTDI SDK. \n\n### originatingPackageName\n\n```\nval originatingPackageName: String\n```\n\nName of the package using DTDI. \n\n### receivingPackageHash\n\n```\nval receivingPackageHash: String?\n```\n\nThe first byte of SHA256 of the alternative package name. Only set on the receiving device\nduring a cross app experience.\n\nCompanion functions\n-------------------\n\n### fromAltPackageName\n\n```\nfun fromAltPackageName(\n context: Context, \n originatingPackage: String, \n altPackage: String\n): ClientInfo?\n```\n\nBuilds a [ClientInfo](#) for an alternative package in a cross app experience.\n\n| Parameters ||\n|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| originatingPackage: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | name of the package that initialates the experience. |\n| altPackage: [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | name of the alternative package on the other side of cross app channel. |\n\n### fromPackageName\n\n```\nfun fromPackageName(\n context: Context, \n packageName: String?\n): ClientInfo?\n```\n\nBuilds a [ClientInfo](#) for a specific package name. Within an SDK, the packageName is the\npackageName of the application using the SDK. Within Google Play services, the packageName is the\n`callingPackage` and not the package name of Google Play services."]]