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, and a marketplace listing that uses it is
marked Pro.
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:
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"
{ 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.