flutter_downloader icon indicating copy to clipboard operation
flutter_downloader copied to clipboard

android api 34, sendCancelIfRunning: isInProgress=falsecallback=io.flutter.embedding.android.FlutterActivity

Open andrew2558 opened this issue 1 year ago • 10 comments

Android API 34 Describe the bug When I use flutter_downloader to download files in flutter, the following information is displayed in the android emulator

W/WindowOnBackDispatcher( 5234): sendCancelIfRunning: isInProgress=falsecallback=io.flutter.embedding.android.FlutterActivity$1@98a3d9

flutter code:

FlutterDownloader.cancelAll();

      final taskId = await FlutterDownloader.enqueue(
        url: url,
        savedDir: savedDir,
        fileName: fileName,
        showNotification: true,
        saveInPublicStorage: true,
        openFileFromNotification: false,
      );

      FlutterDownloader.registerCallback(_downloadCallback);

AndroidManifest.xml:

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

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <uses-permission android:name="android.permission.INTERNET" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <!-- <uses-permission android:name="android.permission.READ_PHONE_STATE"/> -->

    <!-- <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> -->

    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
    
    <application
        android:label="aaa"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher"
        android:enableOnBackInvokedCallback="true"
        android:requestLegacyExternalStorage="true">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />

        <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>

There is no other information and the callback function is not called I have no idea where I'm going wrong, can anyone provide some help?

andrew2558 avatar Aug 04 '24 09:08 andrew2558

same issue :(

ncptuan avatar Sep 09 '24 14:09 ncptuan

I am also facing the same issue.

chaitanyak175 avatar Sep 12 '24 11:09 chaitanyak175

I had the same problem

smin9 avatar Sep 18 '24 08:09 smin9

I had the same problem

mohamedabdallah09209 avatar Dec 03 '24 09:12 mohamedabdallah09209

i have the same problem

Bayram1008 avatar Jan 15 '25 13:01 Bayram1008

same problemmm

tfozo avatar Feb 21 '25 12:02 tfozo

same problemmm

Gennadii85 avatar Mar 24 '25 14:03 Gennadii85

W/WindowOnBackDispatcher( 5979): sendCancelIfRunning: isInProgress=false callback=io.flutter.embedding.android.FlutterActivity$1@3957dc5

how to solve it

sahil-Parmar1 avatar Mar 29 '25 05:03 sahil-Parmar1

Any luck on this? Same issue.

kunzig940 avatar Apr 08 '25 18:04 kunzig940

same problem. any one have solved this issue?

usupsuparma avatar Apr 22 '25 04:04 usupsuparma