fluttercommunity / flutter_downloader

Flutter Downloader - A plugin for creating and managing download tasks.
https://pub.dev/packages/flutter_downloader
BSD 3-Clause "New" or "Revised" License
915 stars 515 forks source link

Download notification not shown when permission is not granted #710

Open bartekpacia opened 2 years ago

bartekpacia commented 2 years ago

Describe the bug

The plugin doesn't request notifications permissions, therefore no notifications are ever shown.

To Reproduce

iOS Just run the sample app and observe that no notifications are shown.

Android

Run the sample app on Android 13 Tiramisu (API level 33) and see that no notifications are shown.

frato92 commented 2 years ago

Hi, I have the same problem... I solved changing in AndroidManifest.xml this line from this:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="33"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="33"/>
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

to this:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="28"/>
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
Ahmed-Ezzeldin commented 11 months ago

I fix this issue by requesting notification permission you can user permission_handler package