Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Move clearAllNotifications from pause to destroy #2913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghenry22
Copy link

Notifications should persist when the app is moved to the background in order to draw the user back to re-activate the app when they are done multitasking.

Notifications should be destroyed when the app is closed though to avoid clutter.

This should also resolve:
ghenry22/cordova-plugin-music-controls2#7

Description

move the the clear all notifications call into onDestroy instead of onPause.

Related Issue

#2772
ghenry22/cordova-plugin-music-controls2#7

Motivation and Context

App notifications are still valid while the app is in the background, so it doesn't make sense to destroy all notifications as soon as the app is backgrounded. A lot of notifications are specifically to lead people to bring the app back to the foreground.

Also as this plugin clears ALL notifications from the app, even those generated by other plugins, it causes issues where other plugins need a persistent notification while in background (ie for music playback or voip).

How Has This Been Tested?

Tested in my own app and in a users app (as per the music-controls2 issue report)

Screenshots (if appropriate):

Types of changes

  • [ X] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Notifications should persist when the app is moved to the background in order to draw the user back to re-activate the app when they are done multitasking.

Notifications should be destroyed when the all is closed though to avoid clutter.

This should also resolve:
ghenry22/cordova-plugin-music-controls2#7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant