sendMessage abstract method

Skill sendMessage(
  1. dynamic message,
  2. MessageSendResponseCallback? callback
)

This function allows the HTML application to communicate with the skill that invoked it. The message payload can be any data type. NOTE: This function is rate limited and calls may not always be successful. To handle the throttling error (or any other error), please supply the optional callback argument to the function. The callback always returns the status of the send and any error will be equivalent to HTTP status code. For example rate limit will be a 429 status and general error will be 500, while a success will be 200.*

Implementation

/// NOTE: This function is rate limited and calls may not always be successful.
/// To handle the throttling error (or any other error), please supply the optional
/// callback argument to the function. The callback always returns the status of the send
/// and any error will be equivalent to HTTP status code. For example rate limit will be a
/// 429 status and general error will be 500, while a success will be 200.*
Skill sendMessage(
  dynamic message,
  MessageSendResponseCallback? callback,
);