> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rebind.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# rb.phone

> Send a short notification to the phones connected to this computer.

`rb.phone.notify` sends a short notification to every phone connected to this
computer, such as a note that a long task finished. It is part of
[Rebind Pro](https://docs.rebind.gg/account/pro.md), and a marketplace listing that uses it is
[marked Pro](https://docs.rebind.gg/reference/packages.md#the-marketplace-listing).

Pairing a phone is not turned on in Rebind yet, so today a call with text
answers `{ delivered = false, reason = "no phone connected" }`. The rest of
this page describes the answers once a phone is paired.

**Needs:** `min_sdk=3.20.0`.

This script tells the phone when F8 is pressed and logs why when nothing was
sent:

```luau theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
-- rebind: min_sdk=3.20.0 name=example version=1.0.0
rb.bind("F8", function()
  local result = rb.phone.notify("The replay is saved.", "Clip saved")
  if not result.delivered then
    rb.log.info("not sent:", result.reason)
  end
end)
```

| Signature | Returns |
| - | - |
| `rb.phone.notify(text: string, title: string?) -> PhoneResult` | `{ delivered = true }`, or `{ delivered = false, reason = "..." }` with one of the reasons below; raises when `text` or `title` is not a string |

The call answers at once and does not wait, so it runs anywhere, not only in a
coroutine. It checks, in this order:

* an empty or blank `text`: `reason = "no text"`
* this computer is not listening for phones: `reason = "no phone connected"`
* the account has neither Rebind Pro nor a running trial: `reason = "needs Rebind Pro"`
* no phone is connected: `reason = "no phone connected"`
* more than 5 notifications from the script in 10 seconds:
  `reason = "too many notifications"`

Otherwise it answers `{ delivered = true }`, which means the notification was
queued to at least one phone, not that it was shown. The title is cut to 64
characters and the text to 200; a cut one ends with an ellipsis. An empty
title is left out.

A `text` or `title` that is not a string raises
`rb.phone.notify: text must be a string` or
`rb.phone.notify: title must be a string`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.