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:
androidDisplayNotificationProgress = false
option of the plugin, as since API26, Android requires developers to use notifications when running background tasks.Thanks
Set androidAutoClearNotification
to true.
(Android only) Used to set if notifications should be cleared automatically upon upload completion. Default is false. Please note that setting this to true will also disable the ringtones.