adafruit_ble_apple_notification_center

BLE library for the Apple Notification Center

  • Author(s): Scott Shawcroft

Software and Dependencies:

class adafruit_ble_apple_notification_center.AppleNotificationCenterService(service=None)

Notification service.

Documented by Apple here:
https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Specification/Specification.html
active_notifications

A dictionary of active notifications keyed by id.

wait_for_new_notifications(timeout=None)

Waits for new notifications and yields them. Returns on timeout, update, disconnect or clear.

class adafruit_ble_apple_notification_center.Notification(notification_id, event_flags, category_id, category_count, *, control_point, data_source)

One notification that appears in the iOS notification center.

app_id

String id of the app that generated the notification. It is not the name of the app. For example, Slack is “com.tinyspeck.chatlyio” and Twitter is “com.atebits.Tweetie2”.

category_count = None

Number of other notifications with the same category.

id = None

Integer id of the notification.

message

Message body of the notification. Varies per app.

message_size

Total length of the message string.

negative_action = None

True if the notification has a negative action to respond with. For example, this could be declining a phone call.

negative_action_label

Human readable label of the negative action.

positive_action = None

True if the notification has a positive action to respond with. For example, this could be answering a phone call.

positive_action_label

Human readable label of the positive action.

preexisting = None

True if the notification existed before we connected to the iOS device.

removed = None

True when the notification has been cleared on the iOS device.

subtitle

Subtitle of the notification. Varies per app.

title

Title of the notification. Varies per app.

update(event_flags, category_id, category_count)

Update the notification and clear the attribute cache.