{"action":"closed","issue":{"url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/85","repository_url":"https://api.github.com/repos/lingochamp/FileDownloader","labels_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/85/comments","events_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/85/events","html_url":"https://github.com/lingochamp/FileDownloader/issues/85","id":146236629,"number":85,"title":"基于FileDownloader封装自己的DownloadManager碰到的一些疑惑","user":{"login":"ericxiang","id":4517480,"avatar_url":"https://avatars.githubusercontent.com/u/4517480?v=3","gravatar_id":"","url":"https://api.github.com/users/ericxiang","html_url":"https://github.com/ericxiang","followers_url":"https://api.github.com/users/ericxiang/followers","following_url":"https://api.github.com/users/ericxiang/following{/other_user}","gists_url":"https://api.github.com/users/ericxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/ericxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericxiang/subscriptions","organizations_url":"https://api.github.com/users/ericxiang/orgs","repos_url":"https://api.github.com/users/ericxiang/repos","events_url":"https://api.github.com/users/ericxiang/events{/privacy}","received_events_url":"https://api.github.com/users/ericxiang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lingochamp/FileDownloader/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"Jacksgong","id":6176417,"avatar_url":"https://avatars.githubusercontent.com/u/6176417?v=3","gravatar_id":"","url":"https://api.github.com/users/Jacksgong","html_url":"https://github.com/Jacksgong","followers_url":"https://api.github.com/users/Jacksgong/followers","following_url":"https://api.github.com/users/Jacksgong/following{/other_user}","gists_url":"https://api.github.com/users/Jacksgong/gists{/gist_id}","starred_url":"https://api.github.com/users/Jacksgong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jacksgong/subscriptions","organizations_url":"https://api.github.com/users/Jacksgong/orgs","repos_url":"https://api.github.com/users/Jacksgong/repos","events_url":"https://api.github.com/users/Jacksgong/events{/privacy}","received_events_url":"https://api.github.com/users/Jacksgong/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-04-06T08:44:28Z","updated_at":"2016-04-09T13:06:58Z","closed_at":"2016-04-09T13:06:58Z","body":"作者你好，我今天在尝试自己封装一个DownloadManager的时候有一些疑惑：\r\n1. 需求是，用户点击暂停/继续按钮控制下载任务\r\n2. 我尝试用pause(downloadId）暂停下载任务，但没有找到resume(downloadId)的API\r\n3. 我发现有pause(filedownloadlistener)的API和start(filedownloadlistener,...)的API，但貌似不适用于我的场景，pause之后再调用start，并不能产生效果\r\n4. 我尝试理解你的API设计思路：pause并不是Android自带DownloadManager的暂停。当我调用Pause之后，我需要使用FileDownloader.getImpl().create(url)，重新获取DownloadTask，并start这个任务，对吗？\r\n\r\nP.S. downloadId是会出现为负的场景的对吗，如果我要使用一个默认值表示downloadId不存在，使用什么值会比较合适？\r\n谢谢！"}}