I'm using nativescript plugin nativescript-background-http to upload files in background.
Writing only for Android. Plugin works fine. Plugin displays upload progress in the notification, as required in API26+. When upload is completed (success or error), the notification remains in the drawer until dismissed by the user.
I'm looking for a way to clear the upload notification automatically after success or error.
Has anyone done this before? Guidance on how to access the underlying notification manager that the plugin uses would also be helpful as well.
Notes:
- I can't hide the notification completely using
androidDisplayNotificationProgress = false
option of the plugin, as since API26, Android requires developers to use notifications when running background tasks. - I've searched this question, but couldn't find information about dismissing notifications of the plugin.
Thanks