Added in API level 34

Result


class Result
kotlin.Any
   ↳ android.view.PixelCopy.Result

Contains the result of a PixelCopy request

Summary

Public methods
Bitmap

If the PixelCopy Request was given a destination bitmap with Request.Builder#setDestinationBitmap(Bitmap) then the returned bitmap will be the same as the one given.

Int

Returns the status of the copy request.

Public methods

getBitmap

Added in API level 34
fun getBitmap(): Bitmap

If the PixelCopy Request was given a destination bitmap with Request.Builder#setDestinationBitmap(Bitmap) then the returned bitmap will be the same as the one given. If no destination bitmap was provided, then this will contain the automatically allocated Bitmap to hold the result.

Return
Bitmap the Bitmap the copy request was stored in. This value cannot be null.
Exceptions
java.lang.IllegalStateException if getStatus() is not SUCCESS