devrath / ubiquitous-downloadmanager

πŸ”Œ πšƒπš‘πš’πšœ πš›πšŽπš™πš˜πšœπš’πšπš˜πš›πš’ πšŒπš˜πš—πšπšŠπš’πš—πšœ πšπš‘πšŽ πšπšŽπš–πš˜ πšœπšŠπš–πš™πš•πšŽ πš˜πš— πš‘πš˜πš  𝚝𝚘 𝚞𝚜𝚎 π™³πš˜πš πš—πš•πš˜πšŠπš π™ΌπšŠπš—πšŠπšπšŽπš› 𝚝𝚘 πšπš˜πš πš—πš•πš˜πšŠπš 𝚊 πšπš’πš•πšŽ πšπš›πš˜πš– 𝚊 πšœπšŽπš›πšŸπšŽπš›.
Apache License 2.0
9 stars 3 forks source link

Unable to start Download on Android 12 #7

Closed waleedkalyar closed 11 months ago

waleedkalyar commented 1 year ago

I have cloned your code and implement in my app. I am unable to download files in android 12 device.

devrath commented 1 year ago

@waleedkalyar ... Can you check the log-cat and let me know the stack trace on what error is displayed when you initiate the download.

Also let me know the device name

waleedkalyar commented 1 year ago

Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.770 630-630 WM-SystemFgDispatcher com.example.instazoom I Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=com.example.instazoom/androidx.work.impl.foreground.SystemForegroundService (has extras) } 2023-02-14 12:13:56.778 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.795 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.810 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.828 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.847 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.871 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.907 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.938 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.963 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:56.991 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.016 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.038 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.057 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.074 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.091 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.111 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.128 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.151 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.169 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.182 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.198 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.211 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.228 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.245 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.259 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.277 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.295 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.313 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.329 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.347 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.365 630-736 Compatibil...geReporter com.example.instazoom D Compat change id reported: 150939131; UID 10481; state: ENABLED 2023-02-14 12:13:57.369 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.385 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.402 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.414 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.426 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.438 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.455 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.469 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.489 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.507 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.520 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.548 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.595 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.609 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.628 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.650 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.669 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.687 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.708 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.721 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.738 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.789 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.813 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.835 630-940 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.892 630-952 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.944 630-5087 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.982 630-5077 WM-Processor com.example.instazoom I Moving WorkSpec (410bd78a-7b5f-4a22-b765-da8da1396fe8) to the foreground 2023-02-14 12:13:57.994 630-952 WM-WorkerWrapper com.example.instazoom I Worker result SUCCESS for Work [ id=410bd78a-7b5f-4a22-b765-da8da1396fe8, tags={ DownloadWorker, com.example.instazoom.worker.DownloadWorker } ] 2023-02-14 12:13:58.017 630-630 WM-SystemFgDispatcher com.example.instazoom I Stopping foreground service

waleedkalyar commented 1 year ago

This is the logical report. The problem is that it not show any kind of error message. Also not show any notification and when I check file in downloads there is no new file downloaded.

waleedkalyar commented 1 year ago

The device is Vivo V21e with android 12 OS

devrath commented 1 year ago

@waleedkalyar ... Search for Download Manager in your apps and check if it's disabled and enable it


  1. Clear the cache for this sample app and try again and see if you are able to find the error log in the Error mode of log cat
  2. I am suspecting the download location is not accessible for the download manager.
  3. Put a debugger in the class DownloadWorker and in the block DownloadManager.STATUS_FAILED, See if any error is thrown there
waleedkalyar commented 1 year ago

There is no message in failure its finishing up with success but with no file and notification.

waleedkalyar commented 1 year ago

Maybe you don't have handle storage access inside code.

devrath commented 1 year ago

@waleedkalyar .... I need to check this, I don't have this device ... but all the device and OS versions I checked work. This seems device-specific. Do let me know here if you find more info or logs on this.

devrath commented 11 months ago

Closing the issue for now, Please re-open if the issue is found again.