readme
This commit is contained in:
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
@ -3,6 +3,7 @@
|
|||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/Aria.iml" filepath="$PROJECT_DIR$/Aria.iml" />
|
<module fileurl="file://$PROJECT_DIR$/Aria.iml" filepath="$PROJECT_DIR$/Aria.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/Aria/Aria.iml" filepath="$PROJECT_DIR$/Aria/Aria.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/Aria/Aria-Aria.iml" filepath="$PROJECT_DIR$/Aria/Aria-Aria.iml" />
|
<module fileurl="file://$PROJECT_DIR$/Aria/Aria-Aria.iml" filepath="$PROJECT_DIR$/Aria/Aria-Aria.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
|
@ -223,8 +223,11 @@ public class DownloadUtil implements IDownloadUtil, Runnable {
|
|||||||
mListener.supportBreakpoint(false);
|
mListener.supportBreakpoint(false);
|
||||||
Log.w(TAG, "该下载链接不支持断点下载");
|
Log.w(TAG, "该下载链接不支持断点下载");
|
||||||
handleBreakpoint(conn);
|
handleBreakpoint(conn);
|
||||||
|
} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
|
||||||
|
Log.w(TAG, "任务【" + mDownloadEntity.getDownloadUrl() + "】下载失败,错误码:404");
|
||||||
|
//mListener.onCancel();
|
||||||
} else {
|
} else {
|
||||||
failDownload("任务【" + mDownloadEntity.getDownloadUrl() + "】下载失败,返回码:" + code);
|
failDownload("任务【" + mDownloadEntity.getDownloadUrl() + "】下载失败,错误码:" + code);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
failDownload("下载失败【downloadUrl:"
|
failDownload("下载失败【downloadUrl:"
|
||||||
@ -265,7 +268,8 @@ public class DownloadUtil implements IDownloadUtil, Runnable {
|
|||||||
//RandomAccessFile file = new RandomAccessFile(mDownloadFile.getPath(), "rwd");
|
//RandomAccessFile file = new RandomAccessFile(mDownloadFile.getPath(), "rwd");
|
||||||
////设置文件长度
|
////设置文件长度
|
||||||
//file.setLength(fileLength);
|
//file.setLength(fileLength);
|
||||||
BufferedRandomAccessFile file = new BufferedRandomAccessFile(mDownloadFile.getPath(), "rwd", 8192);
|
BufferedRandomAccessFile file =
|
||||||
|
new BufferedRandomAccessFile(mDownloadFile.getPath(), "rwd", 8192);
|
||||||
//设置文件长度
|
//设置文件长度
|
||||||
file.setLength(fileLength);
|
file.setLength(fileLength);
|
||||||
mListener.onPostPre(fileLength);
|
mListener.onPostPre(fileLength);
|
||||||
|
11
README.md
11
README.md
@ -1,6 +1,6 @@
|
|||||||
# Aria
|
# Aria
|
||||||
</br>
|
</br>
|
||||||
Aria,致力于让下载傻瓜化</br>
|
Aria,让下载更简单。</br>
|
||||||
+ Aria有以下特点:
|
+ Aria有以下特点:
|
||||||
- 简单
|
- 简单
|
||||||
- 可在Dialog、popupWindow等组件中使用
|
- 可在Dialog、popupWindow等组件中使用
|
||||||
@ -18,7 +18,6 @@ Aria,致力于让下载傻瓜化</br>
|
|||||||
[](https://bintray.com/arialyy/maven/Aria/_latestVersion)</br>
|
[](https://bintray.com/arialyy/maven/Aria/_latestVersion)</br>
|
||||||
```java
|
```java
|
||||||
compile 'com.arialyy.aria:Aria:2.4.4'
|
compile 'com.arialyy.aria:Aria:2.4.4'
|
||||||
```
|
|
||||||
|
|
||||||
## 示例
|
## 示例
|
||||||

|

|
||||||
@ -133,16 +132,16 @@ Aria支持https下载,如果你希望使用自己的ca证书,那么你需要
|
|||||||
```
|
```
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
## 开发日志
|
## 开发日志
|
||||||
|
+ v_2.4.4 修复不支持断点的下载链接拿不到文件大小的问题
|
||||||
|
+ v_2.4.3 修复404链接卡顿的问题
|
||||||
+ v_2.4.2 修复失败重试无效的bug
|
+ v_2.4.2 修复失败重试无效的bug
|
||||||
+ v_2.4.1 修复下载慢的问题,修复application、service 不能使用的问题
|
+ v_2.4.1 修复下载慢的问题,修复application、service 不能使用的问题
|
||||||
+ v_2.4.0 支持https链接下载
|
+ v_2.4.0 支持https链接下载
|
||||||
+ v_2.3.8 修复数据错乱的bug、添加fragment支持
|
+ v_2.3.8 修复数据错乱的bug、添加fragment支持
|
||||||
+ v_2.3.6 添加dialog、popupWindow支持
|
+ v_2.3.6 添加dialog、popupWindow支持
|
||||||
+ v_2.3.3
|
+ v_2.3.3 添加断点支持、修改下载逻辑,让使用更加简单、修复一个内存泄露的bug
|
||||||
- 添加断点支持
|
|
||||||
- 修改下载逻辑,让使用更加简单
|
|
||||||
- 修复一个内存泄露的bug
|
|
||||||
+ v_2.3.1 重命名为Aria,下载流程简化
|
+ v_2.3.1 重命名为Aria,下载流程简化
|
||||||
+ v_2.1.1 增加,选择最大下载任务数接口
|
+ v_2.1.1 增加,选择最大下载任务数接口
|
||||||
|
|
||||||
|
17
app/proguard-rules.pro
vendored
17
app/proguard-rules.pro
vendored
@ -1,17 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# By default, the flags in this file are appended to flags specified
|
|
||||||
# in D:\sdk/tools/proguard/proguard-android.txt
|
|
||||||
# You can edit the include path and order by changing the proguardFiles
|
|
||||||
# directive in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# Add any project specific keep options here:
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="download_url">
|
<string-array name="download_url">
|
||||||
<item>http://g37.gdl.netease.com/onmyoji_netease.apk</item>
|
<item>http://g37.gdl.netease.com/onmyoji_netease_1.apk</item>
|
||||||
<item>http://static.gaoshouyou.com/d/eb/f2/dfeba30541f209ab8a50d847fc1661ce.apk</item>
|
<item>http://static.gaoshouyou.com/d/eb/f2/dfeba30541f209ab8a50d847fc1661ce.apk</item>
|
||||||
<item>http://rs.0.gaoshouyou.com/d/51/46/58514d126c46b8a3f27fc8c7db3b09ec.apk</item>
|
<item>http://rs.0.gaoshouyou.com/d/51/46/58514d126c46b8a3f27fc8c7db3b09ec.apk</item>
|
||||||
<item>http://rs.0.gaoshouyou.com/d/23/69/07238f952669727878d7a0e180534c8b.apk</item>
|
<item>http://rs.0.gaoshouyou.com/d/23/69/07238f952669727878d7a0e180534c8b.apk</item>
|
||||||
|
Reference in New Issue
Block a user