coolerfall/Android-HttpDownloadManager

shared storage is not currently available

Moseqi opened this issue · 3 comments

Getting NPE on Vivo devices

  • Vivo Y53
  • Vivo 1724
  • Vivo 1803

Runs with Android versions 6.0.1 and 8.1.0

#Stacktrace

Fatal Exception: java.lang.NullPointerException: shared storage is not currently available
at java.util.Objects.requireNonNull(Objects.java:109)
at com.coolerfall.download.Preconditions.checkNotNull(Preconditions.java)
at com.coolerfall.download.DownloadManager.(DownloadManager.java)
at com.coolerfall.download.DownloadManager$Builder.build(DownloadManager.java)
at com...getConfigValue(Utils.java)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.java)
at kotlinx.coroutines.scheduling.TaskImpl.run(TaskImpl.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java)

Check storage first yourself.

Check storage first yourself.

Checked and working fine, Thanks.
P.s storage is working fine, the bug is still persist.

DownloadManager uses context.getExternalFilesDir to get download directory. If this is not available, it means you have no permission to use it.