ko2ic / image_downloader

Flutter plugin that downloads images and movies on the Internet and saves to Photo Library on iOS or specified directory on Android.
https://pub.dartlang.org/packages/image_downloader#-readme-tab-
MIT License
92 stars 116 forks source link

How to get rid of download notification #43

Open Vamp808 opened 5 years ago

Vamp808 commented 5 years ago

When I download image using this plugin, a download notification (in status bar & notification area) appears, after the download completes, the name of this notification is like a date (not the downloaded file name) and when press this notification to open it, it opens nothing (like file not exist) my questions:

  1. if I can make this notification works (so it will open the downloaded file when pressed), please show me how.
  2. if I can't make it works, how can I remove it??

tested on Android 6 phone.

ko2ic commented 4 years ago

@Vamp2000 This is a bug but I don't have time to fix it. If you are in a hurry, you will fork and delete 230 lines(setNotificationVisibility) in ImageDownloaderPlugin.kt

dspoonia7 commented 4 years ago

Facing the same issue. On clicking the notification, it opens the Downloads folder and it shows the downloaded image as well but on clicking the image, it says "Couldn't find file". [shared is a screenshot below]. Though the image gets downloaded and can be accessed from Gallery successfully.

rsz_1screenshot_2019-10-17-19-42-39-763_comandroidprovidersdownloadsui

IshankDev commented 4 years ago

As a alternative you can use open function after downloading the file and show downloaded file to user.

var imageId = await ImageDownloader.downloadImage(url); var path = await ImageDownloader.findPath(imageId); await ImageDownloader.open(path);

Thanks

rignaneseleo commented 4 years ago

I pulled this fix.

Can you please also remove the huge print that runs while download a picture? I get houndred of these: D/image_downloader(32333): RequestResult(id=3430, remoteUri=https://firebasestorage.googleapis.com/v0/b/my-grandkids.appspot.com/o/F6A6BEF8-51D4-4A7A-A51D.jpg?alt=media&token=1c2a72a2-aa9e-4ee8-82ca-0a0d31e3eb1e, localUri=file:///storage/emulated/0/Download/2020-01-10.19.16.033, mediaType=image/jpeg, totalSize=7096078, title=2020-01-10.19.16.033, description=)

EDIT: using my pull brench in pubspec.yaml dosn't hide the notifications

  image_downloader:
    git:
      url: git://github.com/rignaneseleo/image_downloader.git
jus7uice commented 4 years ago

Has anyone managed to overcome this bug?