Turns notifications received over the Apple Notification Center Service into items.
More...
Turns notifications received over the Apple Notification Center Service into items.
The ANCS client hands over the fetched notification and app attributes. Each app seen is recorded in the iOS notification preferences database, which the phone syncs to add actions, colors, mute schedules and filtering rules. Muted and filtered notifications are dropped, incoming calls go to the phone service, duplicates are ignored, and the rest are stored as notifications (see Notifications).
◆ ANCS_ACTION_MAX_LENGTH
| #define ANCS_ACTION_MAX_LENGTH 10 |
◆ ANCS_APP_ID_MAX_LENGTH
| #define ANCS_APP_ID_MAX_LENGTH 60 |
◆ ANCS_DATE_LENGTH
| #define ANCS_DATE_LENGTH 15 |
◆ ANCS_MESSAGE_MAX_LENGTH
| #define ANCS_MESSAGE_MAX_LENGTH 200 |
◆ ANCS_SUBTITLE_MAX_LENGTH
| #define ANCS_SUBTITLE_MAX_LENGTH 40 |
◆ ANCS_TITLE_MAX_LENGTH
| #define ANCS_TITLE_MAX_LENGTH 128 |
◆ ancs_app_attr
The attributes got of the app of a notification.
| Enumerator |
|---|
| ANCS_APP_ATTR_DISPLAY_NAME | |
| ANCS_APP_ATTR_COUNT | |
◆ ancs_notif_attr
The attributes got of a notification, in the order they are asked for.
| Enumerator |
|---|
| ANCS_NOTIF_ATTR_POSITIVE_ACTION_LABEL | |
| ANCS_NOTIF_ATTR_NEGATIVE_ACTION_LABEL | |
| ANCS_NOTIF_ATTR_APP_ID | |
| ANCS_NOTIF_ATTR_TITLE | |
| ANCS_NOTIF_ATTR_SUBTITLE | |
| ANCS_NOTIF_ATTR_MESSAGE | |
| ANCS_NOTIF_ATTR_DATE | |
| ANCS_NOTIF_ATTR_COUNT | |
◆ ancs_notifications_handle_access_denied()
| void ancs_notifications_handle_access_denied |
( |
void |
| ) |
|
Tell the user that iOS refuses to share notifications with this watch.
Called when iOS keeps rejecting Control Point writes. Posts a notification explaining how to turn on notification sharing.
◆ ancs_notifications_handle_message()
Handle a notification fetched from ANCS.
- Parameters
-
| notif | The notification, as the phone told of it. |
| recovered | Whether it predates the session, seen right after reconnecting: it may have been missed while disconnected. |
| notif_attributes | Notification attributes, indexed by enum ancs_notif_attr. |
| app_attributes | App attributes, indexed by enum ancs_app_attr. |
◆ ancs_notifications_handle_notification_removed()
| void ancs_notifications_handle_notification_removed |
( |
const struct pbl_bt_ancs_notif * |
notif | ) |
|
Handle the removal of a notification from the iOS notification center.
The stored notification is marked dismissed, and an incoming call UI is hidden.
- Parameters
-
| notif | The removed notification, as the phone told of it. |
◆ ancs_notifications_handle_session_lost()
| void ancs_notifications_handle_session_lost |
( |
void |
| ) |
|
Record that the ANCS session went away.
Notifications posted after this point are recovered when iOS re-sends them as pre-existing on reconnection.