react-native-fetch-blob
react-native-fetch-blob copied to clipboard
Notification false does not work on Android
const download = (url: string, imageTimeStamp: number, callback: (filepath: string) => void) => {
let ext: string = '.jpg';
const { config, fs } = RNFetchBlob;
let PictureDir = fs.dirs.PictureDir;
console.log('PictureDir - ', PictureDir);
try {
let options = {
notification: false,
addAndroidDownloads: {
useDownloadManager: true,
path: PictureDir + '/profile_image_' + imageTimeStamp.toString() + ext,
description: 'Image'
}
};
config(options).fetch('GET', url).then((res) => {
console.log('res - ', res);
let filePath = options.addAndroidDownloads.path;
callback(filePath);
});
} catch (error) {
console.log('Error in downloading image - ', error);
}
};
Notification is displayed every time the image has finished downloading. I have also tried to move notification: false in addAndroidDownloads but still does not work. "react-native": "0.53.0" "react-native-fetch-blob": "0.10.8"
i have same problem, have you find for solution? @LorandP