question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

openFileFromNotification not working

See original GitHub issue

When download is finished, the notification show a Complete status, when i click on it, it doesn’t open the file. Here’s my code:

app.dart

      FlutterDownloader.enqueue(
        url: url,
        headers: {'Authorization': user.token},
        fileName: fileName,
        savedDir: localPath,
        showNotification: true,
        openFileFromNotification: true,
      );

AndroidManifest.xml

<manifest>
    <application>
    ....
    ....
        <provider
            android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
            android:authorities="${applicationId}.flutter_downloader.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"/>
        </provider>
    </application>
</manifest>

What can be the problem?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:6

github_iconTop GitHub Comments

4reactions
effytevacommented, Nov 1, 2021

We’re running into the same issue. The recommend solution doesn’t seem to work.

2reactions
xOldeVxcommented, May 6, 2021

In Android 11 it doesn’t open, but in other versions it’s open the file from the notification

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open file from notification - android - Stack Overflow
Open file from notification ... My problem is that with any extension the message on the chooser is No app can perform this...
Read more >
flutter_downloader | Flutter Package - Pub.dev
Powerful plugin making it easy to download files.
Read more >
You cannot open a file by clicking Open on the Notification bar ...
You click Open on the Notification bar to open the file. In this scenario, you experience one of the following issues: The file...
Read more >
Flutter_Downloader package implementation made easier.
So I was working on my project, and I came to a point where I wanted to add ... true,openFileFromNotification: false,);print(_taskid);});}.
Read more >
[Solved]-Download file from url, save to phones storage-Flutter
It works for me, but I do not check it on big files. ... add these lines in the manifest file, otherwise it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found