Skip to content

Add actions to notifications #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2022
Merged

Add actions to notifications #16

merged 4 commits into from
Apr 11, 2022

Conversation

todbot
Copy link
Contributor

@todbot todbot commented Apr 5, 2022

Notifications have optional "positive action" and "negative action" responses.
This PR adds those actions to the adafruit_ble_apple_notification_center.Notification class.
This allows, for instance, the ability to accept or decline IncomingCalls and to hang up ActiveCalls.

This PR also adds a new category ID description of "ActiveCall" for category_id=12, which was introduced in iOS 13.

An example is provided that works on Circuit Playground Bluefruit.

Demo of it in action here: https://twitter.com/todbot/status/1511483283493687296

@todbot
Copy link
Contributor Author

todbot commented Apr 5, 2022

Huh okay, CI is failing in a really weird way, complaining that Module 'struct' has no 'pack' member. And on code I didn't touch.

@tekktrik tekktrik requested a review from a team April 6, 2022 02:50
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! thanks for the new functionality @todbot! Thank you for including the example of this as well.

These changes look good to me. Don't have an iOS device to test with, but code makes sense to me.

Sometimes the version of one or more of the tools that CI runs changes on us and then causes failures on code that is otherwise untouched by a PR, my guess is that took place here. Thanks for getting it squared away.

@FoamyGuy FoamyGuy merged commit 258bb62 into adafruit:main Apr 11, 2022
evaherrada added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 11, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_EMC2101 to 1.1.12 from 1.1.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_EMC2101#22 from rivimey/convrate_docstring
  > Update Black to latest.
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO to 5.6.5 from 5.6.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_AdafruitIO#88 from awgrover/unsubscribe-group-key-87
  > Update Black to latest.

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center to 0.10.0 from 0.9.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center#16 from todbot/add_actions
  > Update Black to latest.
  > Fixed readthedocs build
  > Consolidate Documentation sections of README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants