flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

openFileFromNotification can't open .docx files

Open xOldeVx opened this issue 3 years ago • 5 comments

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,
      );

xOldeVx avatar May 06 '21 10:05 xOldeVx

same with csv files. pressing the notification does nothing.

miri-red avatar May 18 '21 08:05 miri-red

same with pdf D:

LucasMGS avatar Jun 04 '21 15:06 LucasMGS

same with image file

rkoshti avatar Jun 19 '21 14:06 rkoshti

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>

arshadbarves avatar Jul 10 '21 15:07 arshadbarves

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

bermanapps avatar Jun 29 '23 17:06 bermanapps