readme doc
This commit is contained in:
@ -7,8 +7,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 9
|
minSdkVersion 9
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 85
|
versionCode 100
|
||||||
versionName "2.3.7"
|
versionName "3.0.0"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
@ -58,7 +58,7 @@ public class DownloadTarget extends AbsTarget<DownloadEntity, DownloadTaskEntity
|
|||||||
/**
|
/**
|
||||||
* 给url请求添加头部
|
* 给url请求添加头部
|
||||||
*
|
*
|
||||||
* @param headers Map<Key, Value>
|
* @param headers key为http头部的key,Value为http头对应的配置
|
||||||
*/
|
*/
|
||||||
public DownloadTarget addHeaders(Map<String, String> headers) {
|
public DownloadTarget addHeaders(Map<String, String> headers) {
|
||||||
super._addHeaders(headers);
|
super._addHeaders(headers);
|
||||||
|
@ -97,8 +97,6 @@ public class AbsTarget<ENTITY extends IEntity, TASK_ENTITY extends ITaskEntity>
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 给url请求添加头部
|
* 给url请求添加头部
|
||||||
*
|
|
||||||
* @param headers Map<Key, Value>
|
|
||||||
*/
|
*/
|
||||||
protected void _addHeaders(Map<String, String> headers) {
|
protected void _addHeaders(Map<String, String> headers) {
|
||||||
if (headers != null && headers.size() > 0) {
|
if (headers != null && headers.size() > 0) {
|
||||||
|
@ -72,7 +72,7 @@ public class UploadTarget extends AbsTarget<UploadEntity, UploadTaskEntity> {
|
|||||||
/**
|
/**
|
||||||
* 设置上传文件类型
|
* 设置上传文件类型
|
||||||
*
|
*
|
||||||
* @param contentType <code>"multipart/form-data"<code/>
|
* @param contentType tip:multipart/form-data
|
||||||
*/
|
*/
|
||||||
public UploadTarget setContentType(String contentType) {
|
public UploadTarget setContentType(String contentType) {
|
||||||
taskEntity.contentType = contentType;
|
taskEntity.contentType = contentType;
|
||||||
@ -93,7 +93,7 @@ public class UploadTarget extends AbsTarget<UploadEntity, UploadTaskEntity> {
|
|||||||
/**
|
/**
|
||||||
* 给url请求添加头部
|
* 给url请求添加头部
|
||||||
*
|
*
|
||||||
* @param headers Map<Key, Value>
|
* @param headers key为http头部的key,Value为http头对应的配置
|
||||||
*/
|
*/
|
||||||
public UploadTarget addHeaders(Map<String, String> headers) {
|
public UploadTarget addHeaders(Map<String, String> headers) {
|
||||||
super._addHeaders(headers);
|
super._addHeaders(headers);
|
||||||
|
@ -131,9 +131,9 @@ public class CheckUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测下载实体是否合法
|
* 检测下载实体是否合法
|
||||||
|
* 合法(true)
|
||||||
*
|
*
|
||||||
* @param entity 下载实体
|
* @param entity 下载实体
|
||||||
* @return 合法(true)
|
|
||||||
*/
|
*/
|
||||||
public static void checkDownloadTaskEntity(DownloadEntity entity) {
|
public static void checkDownloadTaskEntity(DownloadEntity entity) {
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
|
32
README.md
32
README.md
@ -8,6 +8,7 @@ Aria,让上传、下载更容易实现</br>
|
|||||||
- 支持多任务自动调度
|
- 支持多任务自动调度
|
||||||
- 可以直接获取速度
|
- 可以直接获取速度
|
||||||
- 支持https地址下载
|
- 支持https地址下载
|
||||||
|
- 支持上传操作
|
||||||
|
|
||||||
Aria怎样使用?
|
Aria怎样使用?
|
||||||
* [下载](#使用)
|
* [下载](#使用)
|
||||||
@ -18,12 +19,12 @@ Aria怎样使用?
|
|||||||
## 下载
|
## 下载
|
||||||
[](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.0'
|
compile 'com.arialyy.aria:Aria:3.0.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
## 示例
|
## 示例
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## 性能
|
## 性能
|
||||||

|

|
||||||
@ -103,7 +104,7 @@ compile 'com.arialyy.aria:Aria:2.4.0'
|
|||||||
```
|
```
|
||||||
|
|
||||||
### 关于下载的其它api
|
### 关于下载的其它api
|
||||||
[Download API]()
|
[Download API](https://github.com/AriaLyy/Aria/blob/master/DownloadApi.md)
|
||||||
|
|
||||||
**tips:为了防止内存泄露的情况,事件类需要使用staic进行修饰**
|
**tips:为了防止内存泄露的情况,事件类需要使用staic进行修饰**
|
||||||
|
|
||||||
@ -135,17 +136,22 @@ compile 'com.arialyy.aria:Aria:2.4.0'
|
|||||||
.cancel();
|
.cancel();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 其他
|
||||||
|
有任何问题,可以在[issues](https://github.com/AriaLyy/Aria/issues)给我留言反馈。
|
||||||
|
|
||||||
***
|
***
|
||||||
## 开发日志
|
## 开发日志
|
||||||
+ v_2.4.0 支持https链接下载
|
+ v_3.0.0 添加上传任务支持,修复一些已发现的bug
|
||||||
+ v_2.3.8 修复数据错乱的bug、添加fragment支持
|
+ v_2.4.4 修复不支持断点的下载链接拿不到文件大小的问题
|
||||||
+ v_2.3.6 添加dialog、popupWindow支持
|
+ v_2.4.3 修复404链接卡顿的问题
|
||||||
+ v_2.3.3
|
+ v_2.4.2 修复失败重试无效的bug
|
||||||
- 添加断点支持
|
+ v_2.4.1 修复下载慢的问题,修复application、service 不能使用的问题
|
||||||
- 修改下载逻辑,让使用更加简单
|
+ v_2.4.0 支持https链接下载
|
||||||
- 修复一个内存泄露的bug
|
+ v_2.3.8 修复数据错乱的bug、添加fragment支持
|
||||||
+ v_2.3.1 重命名为Aria,下载流程简化
|
+ v_2.3.6 添加dialog、popupWindow支持
|
||||||
+ v_2.1.1 增加,选择最大下载任务数接口
|
+ v_2.3.3 添加断点支持、修改下载逻辑,让使用更加简单、修复一个内存泄露的bug
|
||||||
|
+ v_2.3.1 重命名为Aria,下载流程简化
|
||||||
|
+ v_2.1.1 增加,选择最大下载任务数接口
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
BIN
img/sing_upload.gif
Normal file
BIN
img/sing_upload.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 228 KiB |
Reference in New Issue
Block a user