Skip to content

[Android] Unable to open/Install APK from notification #973

Open
@mohsinnaqvi606

Description

@mohsinnaqvi606

Describe the bug
I cannot open/install APK from notification after download completion, other formats are working but APK is not working.
I have checked integration multiple times and also added this permission in the manifest

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission
        android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
        tools:ignore="ScopedStorage" />

In Addition, I am unable see to any errors or log in console. If there is any error, it should show at least an error

To Reproduce
Use this code for APK testing (Error)

await FlutterDownloader.enqueue(
        url: "https://adara-vpn-apks.s3.us-east-2.amazonaws.com/156bb4ad-fa7a-4cfd-829a-7f238fa7a33b-V5GE6.apk",
        headers: {},
        savedDir: "/storage/emulated/0/Download",
        saveInPublicStorage: true,
        showNotification: true,
        openFileFromNotification: true,
      );

Use this code for image testing (working)

await FlutterDownloader.enqueue(
        url: "https://img-cdn.pixlr.com/image-generator/history/65bb506dcb310754719cf81f/ede935de-1138-4f66-8ed7-44bd16efc709/medium.webp",
        headers: {},
        savedDir: "/storage/emulated/0/Download",
        saveInPublicStorage: true,
        showNotification: true,
        openFileFromNotification: true,
      );

Steps to reproduce the behavior:

  1. Call this code on the button or anything
  2. Wait for downloading
  3. Click on the notification and check behavior

Expected behavior
After successful download install should open to install APK.

Device information:
I tested it on multiple real devices and emulators but the behavior is the same on all devices

  • Device: Redmi 13
  • OS: Android 14
  • plugin version: ^1.11.8

Additional context
Your provided example is not working as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions