diff --git a/adafruit_ble_apple_notification_center.py b/adafruit_ble_apple_notification_center.py index e91eec9..5fc3b73 100644 --- a/adafruit_ble_apple_notification_center.py +++ b/adafruit_ble_apple_notification_center.py @@ -70,6 +70,7 @@ def __get__(self, notification, cls): "BusinessAndFinance", "Location", "Entertainment", + "ActiveCall", ) @@ -140,6 +141,22 @@ def __init__( self.control_point = control_point self.data_source = data_source + def send_positive_action(self): + """Sends positive action on this notification. For example, to accept an IncomingCall.""" + cmd = 2 # ANCS_CMD_PERFORM_NOTIFICATION_ACTION, + uid = self.id + action_id = 0 # ANCS_ACTION_POSITIVE + buffer = struct.pack(" 3.0: + last_display_time = time.monotonic() + print( + "Current Notifications:", + len(ans.active_notifications), + time.monotonic(), + ) + for nid, n in ans.active_notifications.items(): + print( + "- uid:", + n.id, + "catid:", + n.category_id, + "title:", + n.title, + "msg:", + n.message, + )