Interface to handle notification when new buffers are available via USAGE_IO_INPUT. An application will receive one notification when a buffer is available. Additional buffers will not trigger new notifications until a buffer is processed.
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,["# Allocation.OnBufferAvailableListener\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnBufferAvailableListener\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/renderscript/Allocation.OnBufferAvailableListener \"View this page in Java\") \n\n```\ninterface OnBufferAvailableListener\n```\n\n|----------------------------------------------------------------|\n| [android.renderscript.Allocation.OnBufferAvailableListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 31.**\n|\n| Deprecated in Java.\n\nInterface to handle notification when new buffers are available via [USAGE_IO_INPUT](/reference/kotlin/android/renderscript/Allocation#USAGE_IO_INPUT:kotlin.Int). An application will receive one notification when a buffer is available. Additional buffers will not trigger new notifications until a buffer is processed.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onBufferAvailable](#onBufferAvailable(android.renderscript.Allocation))`(`a:` `[Allocation](/reference/kotlin/android/renderscript/Allocation)!`)` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### onBufferAvailable\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onBufferAvailable(a: Allocation!): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*"]]