我想您想在
if块中放入类似的内容。替换
YOUR_DM为您的DownloadManager实例。
Bundle extras = intent.getExtras();DownloadManager.Query q = new DownloadManager.Query();q.setFilterById(extras.getLong(DownloadManager.EXTRA_DOWNLOAD_ID));Cursor c = YOUR_DM.query(q);if (c.moveToFirst()) { int status = c.getInt(c.getColumnIndex(DownloadManager.COLUMN_STATUS)); if (status == DownloadManager.STATUS_SUCCESSFUL) { // process download title = c.getString(c.getColumnIndex(DownloadManager.COLUMN_TITLE)); // get other required data by changing the constant passed to getColumnIndex }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)