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 514 forks source link

openFileFromNotification can't open .docx files #467

Open xOldeVx opened 3 years ago

xOldeVx commented 3 years ago

When the download is complete the notification can't open .docx files, only images/videos/audio files. I didn't try it on PDF files, but i think is the same like .docx files. of course i have office and google drive installed, and can open it manually.

Here's my code:

      FlutterDownloader.enqueue(
        url: url,
        headers: {'Authorization': user.token},
        savedDir: localPath,
      );
miri-red commented 3 years ago

same with csv files. pressing the notification does nothing.

LucasMGS commented 3 years ago

same with pdf D:

rkoshti commented 3 years ago

same with image file

arshadbarves commented 3 years ago

For Flutter_Downloader

If you are using API 29+(ANDROID 10 and Above) add the below code in AndriodManifest.xml

android:requestLegacyExternalStorage="true"

Like this


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">  

    ...........

    <application
        ..............
        <!-- Add This line -->

        tools:replace="android:label" 
        android:requestLegacyExternalStorage="true"> <!-- Add This line if you are targeting android API 29+-->

        <activity>
            ...............
        </activity>

    </application>
</manifest>
bermanapps commented 1 year ago

This doesn't work for me, and I'm still facing this problem. Any updates?