-
-
Notifications
You must be signed in to change notification settings - Fork 613
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
support interruption level on ios devices #711
base: master
Are you sure you want to change the base?
Conversation
Motivation: We never know when we might be implementing or extending the `django-push-notifications` library beyond its current support. It makes sense to have a module to handle critical moments such as that raised in #708 (for `interruption-levels`). This gives control over newly implemented interfaces without having to worry about outdated modules, such as `PyAPNS2`. This allows us to provide wrapper or extend existing library functionalities. Context: This patch address one side of issue by providing an enumeration module that can be used to deal with public and underlying APIs.
for Apple Devices Digging deep into `PyAPNs2`, I found that the library does have internal priority levels, distinctively, `Immediate` and `Delayed`. In addition to this, support different notification types, such as `Background`, `Alert`, `VoIP`, `Complication`, `FileProvider` and `mdm`. This patch extend one or two of these interfaces to support `interruption_levels` on User Notification Center. Below is what is contained in this commit: - [x] New enumeration types to support interruption levels: `time_sensitive`, `active`, `passive`, `critical` alerts - [x] Wrapper functions to help add additional functionality to existing `_apns_send` and `_apns_prepare` methods. This design allows for modification of functionality without breaking backwards compatibility, and also giving control over what-is-what.
Your PR is difficult to review because of whitespace changes. If there are whitespace fixes to make, please do them in a separate commit/PR. |
That was my editor overriding the editorconfig settings, I think I would have to find a way make it respect With that pointed out, i'd try see to revert to previous change. |
Hello team,
Digging deep into
PyAPNs2
, I found that the library does have internalpriority levels, distinctively,
Immediate
andDelayed
.In addition to this, support different notification types, such as
Background
,Alert
,VoIP
,Complication
,FileProvider
andmdm
.This patch extend one or two of these interfaces to support
interruption_levels
on User Notification Center. Below is what iscontained in this commit:
time_sensitive
,active
,passive
,critical
alerts_apns_send
and_apns_prepare
methods. This design allows formodification of functionality without breaking backwards
compatibility, and also giving control over what-is-what.
NOTE: This should be tested on real Apple devices or emulators
before merged.
This patch is a work-in-progress and I would like to get feedback on
this before I proceed with the next steps. Can you take a look at this? @pomali
CC: @jleclanche
Commits:
interruption_level
toapns_send_message()
function signatureapns_send_message()
interface