PebbleOS
Loading...
Searching...
No Matches
Enumerations | Functions

Decides whether and how the user is alerted for a call or notification. More...

Enumerations

enum  AlertType {
  AlertInvalid = NotificationInvalid , AlertMobile = NotificationMobile , AlertPhoneCall = NotificationPhoneCall , AlertOther = NotificationOther ,
  AlertReminder = NotificationReminder
}
 Kind of alert, mirroring NotificationType. More...
 

Functions

void alerts_incoming_alert_analytics ()
 Record analytics for an incoming alert.
 
bool alerts_should_notify_for_type (AlertType type)
 Check whether the user should be notified at all.
 
bool alerts_should_enable_backlight_for_type (AlertType type)
 Check whether the backlight should turn on for an alert.
 
bool alerts_should_vibrate_for_type (AlertType type)
 Check whether the watch should vibrate for an alert.
 
void alerts_set_notification_vibe_timestamp ()
 Record that the watch vibrated for a notification.
 

Detailed Description

Decides whether and how the user is alerted for a call or notification.

Nothing alerts in low power mode or during a firmware update. Otherwise an alert type must be enabled in the alert mask; while Do Not Disturb is active it must also be in the DND mask to vibrate or turn on the backlight.

Enumeration Type Documentation

◆ AlertType

enum AlertType

Kind of alert, mirroring NotificationType.

Enumerator
AlertInvalid 

Not a valid type.

AlertMobile 

Notification from a phone app.

AlertPhoneCall 

Phone call.

AlertOther 

Any other alert.

AlertReminder 

Timeline reminder.

Function Documentation

◆ alerts_incoming_alert_analytics()

void alerts_incoming_alert_analytics ( )

Record analytics for an incoming alert.

Call before alerting the user for any notification or call.

◆ alerts_set_notification_vibe_timestamp()

void alerts_set_notification_vibe_timestamp ( )

Record that the watch vibrated for a notification.

Starts the holdoff that prevents several vibrations within a short period.

◆ alerts_should_enable_backlight_for_type()

bool alerts_should_enable_backlight_for_type ( AlertType  type)

Check whether the backlight should turn on for an alert.

Parameters
typeKind of alert.
Returns
true if the notification backlight preference is on, type is allowed by the DND mask when DND is active, and alerts_should_notify_for_type() allows it.

◆ alerts_should_notify_for_type()

bool alerts_should_notify_for_type ( AlertType  type)

Check whether the user should be notified at all.

Parameters
typeKind of alert.
Returns
false in low power mode, during a firmware update or if type is not in the alert mask, true otherwise.

◆ alerts_should_vibrate_for_type()

bool alerts_should_vibrate_for_type ( AlertType  type)

Check whether the watch should vibrate for an alert.

Vibration is also suppressed while USB is connected and within 3 seconds of the last alerts_set_notification_vibe_timestamp() call.

Parameters
typeKind of alert.
Returns
true if the watch should vibrate.