django-push-notifications
django-push-notifications copied to clipboard
support interruption level on ios devices
Hello team,
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. - [x] Functional tests to verify behaviour of this functionality. 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:
- feat: Create module to support library-specific enumeration types
- feat(APNS): extend library functionality to support interruption level for Apple Devices
-
add
interruption_level
toapns_send_message()
function signature -
test(APNs): add functional tests for updated
apns_send_message()
interface