Stay organized with collections
Save and categorize content based on your preferences.
OnProvideAssistDataListener
interface OnProvideAssistDataListener
Callback interface for use with Application.registerOnProvideAssistDataListener
and Application.unregisterOnProvideAssistDataListener
.
Summary
Public methods |
abstract Unit |
This is called when the user is requesting an assist, to build a full Intent.ACTION_ASSIST Intent with all of the context of the current application.
|
Public methods
onProvideAssistData
abstract fun onProvideAssistData(
activity: Activity!,
data: Bundle!
): Unit
This is called when the user is requesting an assist, to build a full Intent.ACTION_ASSIST
Intent with all of the context of the current application. You can override this method to place into the bundle anything you would like to appear in the Intent.EXTRA_ASSIST_CONTEXT
part of the assist Intent.
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-02-10 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 2025-02-10 UTC."],[],[],null,["# Application.OnProvideAssistDataListener\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnProvideAssistDataListener\n===========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/app/Application.OnProvideAssistDataListener \"View this page in Java\") \n\n```\ninterface OnProvideAssistDataListener\n```\n\n|----------------------------------------------------------|\n| [android.app.Application.OnProvideAssistDataListener](#) |\n\nCallback interface for use with [Application.registerOnProvideAssistDataListener](/reference/kotlin/android/app/Application#registerOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener)) and [Application.unregisterOnProvideAssistDataListener](/reference/kotlin/android/app/Application#unregisterOnProvideAssistDataListener(android.app.Application.OnProvideAssistDataListener)).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onProvideAssistData](#onProvideAssistData(android.app.Activity,%20android.os.Bundle))`(`activity:` `[Activity](/reference/kotlin/android/app/Activity)!`, `data:` `[Bundle](../os/Bundle.html#)!`)` This is called when the user is requesting an assist, to build a full [Intent.ACTION_ASSIST](../content/Intent.html#ACTION_ASSIST:kotlin.String) Intent with all of the context of the current application. |\n\nPublic methods\n--------------\n\n### onProvideAssistData\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onProvideAssistData(\n activity: Activity!, \n data:��Bundle!\n): Unit\n```\n\nThis is called when the user is requesting an assist, to build a full [Intent.ACTION_ASSIST](../content/Intent.html#ACTION_ASSIST:kotlin.String) Intent with all of the context of the current application. You can override this method to place into the bundle anything you would like to appear in the [Intent.EXTRA_ASSIST_CONTEXT](../content/Intent.html#EXTRA_ASSIST_CONTEXT:kotlin.String) part of the assist Intent."]]