novoda / download-manager

A library that handles long-running downloads, handling the network interactions and retrying downloads automatically after failures
Apache License 2.0
483 stars 63 forks source link

Create service connection listener after liteDownloadManager #511

Closed JesseCrocker closed 5 years ago

JesseCrocker commented 5 years ago

In my application onServiceConnected seems to sometimes get called immediately after applicationContext.bindService(...) is called, which causes a crash, because liteDownloadManager is not initialized yet. This PR calls bindService after liteDownloadManager is initialized to eliminate the possibility of this crash.

Fixes #510

hal9002 commented 5 years ago

Can one of the admins review this PR?

zegnus commented 5 years ago

test this please

zegnus commented 5 years ago

@JesseCrocker you need to update this dependency, otherwise, the build will fail:

ping me when done