Stay organized with collections
Save and categorize content based on your preferences.
OnPixelCopyFinishedListener
interface OnPixelCopyFinishedListener
Listener for observing the completion of a PixelCopy request.
Summary
Public methods |
abstract Unit |
Callback for when a pixel copy request has completed.
|
Public methods
onPixelCopyFinished
abstract fun onPixelCopyFinished(copyResult: Int): Unit
Callback for when a pixel copy request has completed. This will be called regardless of whether the copy succeeded or failed.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# PixelCopy.OnPixelCopyFinishedListener\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnPixelCopyFinishedListener\n===========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/PixelCopy.OnPixelCopyFinishedListener \"View this page in Java\") \n\n```\ninterface OnPixelCopyFinishedListener\n```\n\n|---------------------------------------------------------|\n| [android.view.PixelCopy.OnPixelCopyFinishedListener](#) |\n\nListener for observing the completion of a PixelCopy request.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onPixelCopyFinished](#onPixelCopyFinished(kotlin.Int))`(`copyResult:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Callback for when a pixel copy request has completed. |\n\nPublic methods\n--------------\n\n### onPixelCopyFinished\n\nAdded in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onPixelCopyFinished(copyResult: Int): Unit\n```\n\nCallback for when a pixel copy request has completed. This will be called regardless of whether the copy succeeded or failed.\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `copyResult` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Contains the resulting status of the copy request. This will either be [PixelCopy.SUCCESS](/reference/kotlin/android/view/PixelCopy#SUCCESS:kotlin.Int) or one of the `PixelCopy.ERROR_*` values. Value is [android.view.PixelCopy#SUCCESS](/reference/kotlin/android/view/PixelCopy#SUCCESS:kotlin.Int), [android.view.PixelCopy#ERROR_UNKNOWN](/reference/kotlin/android/view/PixelCopy#ERROR_UNKNOWN:kotlin.Int), [android.view.PixelCopy#ERROR_TIMEOUT](/reference/kotlin/android/view/PixelCopy#ERROR_TIMEOUT:kotlin.Int), [android.view.PixelCopy#ERROR_SOURCE_NO_DATA](/reference/kotlin/android/view/PixelCopy#ERROR_SOURCE_NO_DATA:kotlin.Int), [android.view.PixelCopy#ERROR_SOURCE_INVALID](/reference/kotlin/android/view/PixelCopy#ERROR_SOURCE_INVALID:kotlin.Int), or [android.view.PixelCopy#ERROR_DESTINATION_INVALID](/reference/kotlin/android/view/PixelCopy#ERROR_DESTINATION_INVALID:kotlin.Int) |"]]