pxt-calliope/docs/reference/devices/raise-alert-to.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR (#529)
* Accessibility changes
2017-09-07 13:42:08 -07:00

1.3 KiB

raise alert to

Raise an alert on a remote device.

~hint

For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be paired with the @boardname@. Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.

~

devices.raiseAlertTo(MesAlertEvent.Vibrate)

Parameters

  • event - an event identifier

Examples

To tell the connected device to display toast

devices.raiseAlertTo(MesAlertEvent.DisplayToast)

To tell the connected device to vibrate

devices.raiseAlertTo(MesAlertEvent.Vibrate)

To tell the connected device to play a sound

devices.raiseAlertTo(MesAlertEvent.PlaySound)

To tell the connected device to play a ringtone

devices.raiseAlertTo(MesAlertEvent.PlayRingtone)

To tell the connected device to find my phone

devices.raiseAlertTo(MesAlertEvent.FindMyPhone)

To tell the connected device to ring alarm

devices.raiseAlertTo(MesAlertEvent.RingAlarm)

See also

tell remote control to, tell camera to

devices