> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# sendMessage

APISummary
Sends a debugging message of a specified type to the communication peer (e.g., the [DevTool Desktop Application](/next/guide/devtool.md#run-lynx-devtool-desktop-application)).

It works with the [`subscribeMessage`](/next/api/lynx-devtool-native-api/lynx-base-inspector-owner/subscribe-message.md) method to enable two-way communication.

## Syntax

### iOS

```objective-c title="LynxBaseInspectorOwnerNG.h"
- (void)sendMessage:(nonnull CustomizedMessage *)message;
```

#### Parameters

- `message`: The message to send, of type [`CustomizedMessage`](/next/api/lynx-devtool-native-api/customized-message.md).

### Android

```java title="LynxBaseInspectorOwnerNG.java"
void sendMessage(CustomizedMessage message);
```

#### Parameters

- `message`: The message to send, of type [`CustomizedMessage`](/next/api/lynx-devtool-native-api/customized-message.md).

### Harmony

```ts title="LynxBaseInspectorOwner.ets"
sendMessage(type: string, message: string): void;
```

#### Parameters

- `type`: The type of message to send, such as [CDP](https://chromedevtools.github.io/devtools-protocol/) or other custom message types.
- `message`: The message data to send.

## Usage Example

Please refer to [`subscribeMessage`](/next/api/lynx-devtool-native-api/lynx-base-inspector-owner/subscribe-message.md#usage-example).

## Compatibility

**Compatibility Table**

**Query:** `lynx-devtool-native-api.lynx-base-inspector-owner.send-message`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-devtool-native-api/lynx-base-inspector-owner/send-message.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| send-message | Yes (3.0) | Yes (3.8) | Yes (3.0) | Unknown | Unknown | No |

**`send-message`**

sendMessage

