Skip to content

Commit

Permalink
docs:update README v0.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
LiCola-Exist committed Mar 19, 2024
1 parent 76a6b22 commit 13bbd4a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is the open-source SDK for Aliyunpan-Android OpenAPI.

```
dependencies {
implementation 'com.github.alibaba:aliyunpan-android-sdk:v0.1.8'
implementation 'com.github.alibaba:aliyunpan-android-sdk:v0.1.9'
}
```

Expand Down Expand Up @@ -97,10 +97,10 @@ lifecycleScope.launch {
}
```

#### Download
### Download

```
aliyunpanClient.buildDownload(defaultDriveId, fileId, { task ->
aliyunpanClient.buildDownload(driveId, fileId, { task ->
// success
task.addStateChange { taskState ->
when (taskState) {
Expand All @@ -126,6 +126,36 @@ aliyunpanClient.buildDownload(defaultDriveId, fileId, { task ->
})
```

### Upload

```
aliyunpanClient.buildUpload(driveId, filePath, { task ->
// success
task.addStateChange { taskState ->
when (taskState) {
BaseTask.TaskState.Abort -> {
}
is BaseTask.TaskState.Completed -> {
}
is BaseTask.TaskState.Failed -> {
}
is BaseTask.TaskState.Running -> {
}
BaseTask.TaskState.Waiting -> {
}
}
}
val startResult = task.start()
}, {
// failure
})
```


## Documents

[Documents](https://alibaba.github.io/aliyunpan-android-sdk/)
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ android {
}

dependencies {
implementation project(":opensdk")
// implementation 'com.github.alibaba:aliyunpan-android-sdk:+'
// implementation project(":opensdk")
implementation 'com.github.alibaba:aliyunpan-android-sdk:v0.1.9'
implementation "com.squareup.okhttp3:okhttp:4.11.0"
implementation 'com.github.bumptech.glide:glide:4.14.2'

Expand Down

0 comments on commit 13bbd4a

Please sign in to comment.