The base class from which an application should derive in order to receive RS messages from scripts. When a script calls rsSendToClient, the data fields will be filled, and the run method will be called on a separate thread. This will occur some time after rsSendToClient completes in the script, as rsSendToClient is asynchronous. Message handlers are not guaranteed to have completed when android.renderscript.RenderScript#finish returns.
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,["# RenderScript.RSMessageHandler\n\nAdded in [API level 11](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\nRSMessageHandler\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/renderscript/RenderScript.RSMessageHandler \"View this page in Java\") \n\n```\nopen class RSMessageHandler : Runnable\n```\n\n|---|---------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.renderscript.RenderScript.RSMessageHandler](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 31.**\n|\n| Deprecated in Java.\n\nThe base class from which an application should derive in order to receive RS messages from scripts. When a script calls `rsSendToClient`, the data fields will be filled, and the run method will be called on a separate thread. This will occur some time after `rsSendToClient` completes in the script, as `rsSendToClient` is asynchronous. Message handlers are not guaranteed to have completed when [android.renderscript.RenderScript#finish](/reference/kotlin/android/renderscript/RenderScript#finish()) returns.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------|---|\n| [RSMessageHandler](#RSMessageHandler())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|--------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [run](#run())`()` \u003cbr /\u003e |\n\n| Properties ||\n|----------------------------------------------------------------------------------------|----------------------------------------|\n| [IntArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int-array/index.html)! | [mData](#mData:kotlin.IntArray) \u003cbr /\u003e |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [mID](#mID:kotlin.Int) \u003cbr /\u003e |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [mLength](#mLength:kotlin.Int) \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### RSMessageHandler\n\n```\nRSMessageHandler()\n```\n\nPublic methods\n--------------\n\n### run\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun run(): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nProperties\n----------\n\n### mData\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected var mData: IntArray!\n```\n\n**Deprecated:** *Deprecated in Java.* \n\n### mID\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected var mID: Int\n```\n\n**Deprecated:** *Deprecated in Java.* \n\n### mLength\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nprotected var mLength: Int\n```\n\n**Deprecated:** *Deprecated in Java.*"]]