Stay organized with collections
Save and categorize content based on your preferences.
Dtdi
class
Dtdi
Entry point for the DTDI API.
Summary
Companion functions
getClient
@JvmStatic
fun
getClient
(
context
:
Context
)
:
DtdiClient
Creates a new instance of DtdiClient
. System notifications may be generated if the calling
app goes into the background when this method is used and the system needs to prompt the user
to resolve some user recoverable errors (for example, if Google Play services needs to be
updated).
the Context
that is using this client
getClient
@JvmStatic
fun
getClient
(
activity
:
Activity
)
:
DtdiClient
Creates a new instance of DtdiClient
. A dialog may appear when the provided activity is in
the foreground and the system needs to prompt the user to resolve some user recoverable
errors (for example, if Google Play services needs to be updated).
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\u003eDtdi is the entry point for the DTDI API, allowing developers to interact with its functionalities.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDtdiClient\u003c/code\u003e provides methods for creating new client instances, which can be accessed using either a \u003ccode\u003eContext\u003c/code\u003e or an \u003ccode\u003eActivity\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating a \u003ccode\u003eDtdiClient\u003c/code\u003e, system notifications or dialogs might appear for resolving potential user recoverable errors.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetClient\u003c/code\u003e function with a \u003ccode\u003eContext\u003c/code\u003e parameter might generate system notifications if backgrounded.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetClient\u003c/code\u003e function with an \u003ccode\u003eActivity\u003c/code\u003e parameter might trigger dialogs if foregrounded.\u003c/p\u003e\n"]]],[],null,["# Dtdi\n====\n\n```\nclass Dtdi\n```\n\n|---|---------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [com.google.android.gms.dtdi.Dtdi](#) |\n\nEntry point for the DTDI API.\n\nSummary\n-------\n\n| ### Companion functions ||\n|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient) | [getClient](#Companion.getClient(android.content.Context))`(`context:` `[Context](https://developer.android.com/reference/android/content/Context.html)`)` Creates a new instance of [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient). |\n| [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient) | [getClient](#Companion.getClient(android.app.Activity))`(`activity:` `[Activity](https://developer.android.com/reference/android/app/Activity.html)`)` Creates a new instance of [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient). |\n\nCompanion functions\n-------------------\n\n### getClient\n\n```\n@JvmStatic fun getClient(context: Context): DtdiClient\n```\n\nCreates a new instance of [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient). System notifications may be generated if the calling\napp goes into the background when this method is used and the system needs to prompt the user\nto resolve some user recoverable errors (for example, if Google Play services needs to be\nupdated).\n\n| Parameters ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n| context: [Context](https://developer.android.com/reference/android/content/Context.html) | the [Context](https://developer.android.com/reference/android/content/Context.html) that is using this client |\n\n### getClient\n\n```\n@JvmStatic fun getClient(activity: Activity): DtdiClient\n```\n\nCreates a new instance of [DtdiClient](/android/reference/com/google/android/gms/dtdi/core/DtdiClient). A dialog may appear when the provided activity is in\nthe foreground and the system needs to prompt the user to resolve some user recoverable\nerrors (for example, if Google Play services needs to be updated).\n\n| Parameters ||\n|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n| activity: [Activity](https://developer.android.com/reference/android/app/Activity.html) | the [Activity](https://developer.android.com/reference/android/app/Activity.html) that is using this client |"]]