Skip to content

Commit

Permalink
fix(backup): Avoid notification flood in Android when uploading
Browse files Browse the repository at this point in the history
We must show a notification in Android because it is a background
upload but react-native-background-upload does not allow easily to do
1 notification for multiple files. It is 1 notification for 1 file.
So we add the autoClear: true property which remove the notification
when an upload is completed. It is a good workaround to avoid
notification flood.
  • Loading branch information
zatteo committed Jul 24, 2023
1 parent f7c431b commit 9537817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/domain/backup/services/uploadMedia.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const uploadMedia = async (
}`
},
notification: {
enabled: false
enabled: true,
autoClear: true
}
} as UploadOptions

Expand Down

0 comments on commit 9537817

Please sign in to comment.