The Developer Preview for Android 11 is now available; test it out and share your feedback.

OnCommitContentListener

interface OnCommitContentListener
androidx.core.view.inputmethod.InputConnectionCompat.OnCommitContentListener

Listener for commitContent method call, in a backwards compatible fashion.

Summary

Public methods

abstract Boolean
onCommitContent(inputContentInfo: InputContentInfoCompat!, flags: Int, opts: Bundle!)

Intercepts InputConnection#commitContent API calls.

Public methods

onCommitContent

abstract fun onCommitContent(
    inputContentInfo: InputContentInfoCompat!,
    flags: Int,
    opts: Bundle!
): Boolean

Intercepts InputConnection#commitContent API calls.

Parameters
inputContentInfo InputContentInfoCompat!: content to be committed
flags Int: 0 or INPUT_CONTENT_GRANT_READ_URI_PERMISSION
opts Bundle!: optional bundle data. This can be null
Return
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