true if this request is accepted by the application, no matter if the
request is already handled or still being handled in background. false to use the
default implementation
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,["# InputConnectionCompat.OnCommitContentListener\n\nadded in [version 25.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1 \n\nInputConnectionCompat.OnCommitContentListener\n=============================================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\n\ninterface\nInputConnectionCompat.OnCommitContentListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------------------------------------|\n| android.support.v13.view.inputmethod.InputConnectionCompat.OnCommitContentListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nListener for commitContent method call, in a backwards compatible fashion.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[onCommitContent](/reference/android/support/v13/view/inputmethod/InputConnectionCompat.OnCommitContentListener#onCommitContent(android.support.v13.view.inputmethod.InputContentInfoCompat, int, android.os.Bundle))`(`[InputContentInfoCompat](/reference/android/support/v13/view/inputmethod/InputContentInfoCompat)` inputContentInfo, int flags, `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)` opts) ` Intercepts InputConnection#commitContent API calls. |\n\nPublic methods\n--------------\n\n### onCommitContent\n\nadded in [version 25.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean onCommitContent (InputContentInfoCompat inputContentInfo, \n int flags, \n Bundle opts)\n```\n\nIntercepts InputConnection#commitContent API calls.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `inputContentInfo` | `InputContentInfoCompat`: content to be committed \u003cbr /\u003e |\n| `flags` | `int`: `0` or [INPUT_CONTENT_GRANT_READ_URI_PERMISSION](/reference/android/support/v13/view/inputmethod/InputConnectionCompat#INPUT_CONTENT_GRANT_READ_URI_PERMISSION) \u003cbr /\u003e |\n| `opts` | `Bundle`: optional bundle data. This can be `null` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `boolean` | `true` if this request is accepted by the application, no matter if the request is already handled or still being handled in background. `false` to use the default implementation \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - [InputConnectionCompat.OnCommitContentListener](/reference/android/support/v13/view/inputmethod/InputConnectionCompat.OnCommitContentListener)\n-\n\n Classes\n -------\n\n - [EditorInfoCompat](/reference/android/support/v13/view/inputmethod/EditorInfoCompat)\n - [InputConnectionCompat](/reference/android/support/v13/view/inputmethod/InputConnectionCompat)\n - [InputContentInfoCompat](/reference/android/support/v13/view/inputmethod/InputContentInfoCompat)"]]