-
Notifications
You must be signed in to change notification settings - Fork 2.2k
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BindService呼叫時機 #119
Comments
不要在 Application中调用 因此 Application中调用的话,每个进程都会调到。 |
你可以参看下,TasksManagerDemoActivity 里面也调用了 |
我现在改下代码,这种情况我直接抛异常,来引导使用。 |
好,我再抓新本版來測試看看 |
@ArthurPai 我可能不会马上发新版本,太频繁了。你注意下不要在 |
你也可以考虑不要使用多进程模式,这样可以有效减少IPC IO,可以提高下载速度的同时也可以解决你这个问题。 具体如何,你参考下 Wiki 中的 filedownloader.properties 中的
|
謝謝,還是找不到為何會有這現象,因為我並不是在Applicatin#onCreate中呼叫bind 我要先bind的目的是為了App重啟時,可以在沒有呼叫過任何BaseDownloadTask#start,也可以得到之前有下載過的tasks的狀態。 現在我的作法是自己管理Tasks的狀態,將notification得到的狀態及sofar記錄到SQLite,下次App重啟時,就先使用DB中的資訊,而不用去bind service。 |
只要先呼叫bindService,目前還是會出現進度跳來跳去的狀況
如果不呼叫,讓task#start去bind就不會有這現象
我的測試程式是等程式啟動完後,過了一秒之後才去呼叫bindService
下面是目前看到,會發生這個現象時,Log會出現這些資訊,
我有去看了一下這部分的code
不過還看不太懂是什麼情形會引起BaseDownloadTask#updateKeepFlow及BaseDownloadTask#updateKeepAhead出現失敗的狀況
可以請問一下,為何會這樣?
The text was updated successfully, but these errors were encountered: