Skip to content

Commit 13bbd4a

Browse files
committed
docs:update README v0.1.9
1 parent 76a6b22 commit 13bbd4a

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

README.md

+33-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This is the open-source SDK for Aliyunpan-Android OpenAPI.
1111

1212
```
1313
dependencies {
14-
implementation 'com.github.alibaba:aliyunpan-android-sdk:v0.1.8'
14+
implementation 'com.github.alibaba:aliyunpan-android-sdk:v0.1.9'
1515
}
1616
```
1717

@@ -97,10 +97,10 @@ lifecycleScope.launch {
9797
}
9898
```
9999

100-
#### Download
100+
### Download
101101

102102
```
103-
aliyunpanClient.buildDownload(defaultDriveId, fileId, { task ->
103+
aliyunpanClient.buildDownload(driveId, fileId, { task ->
104104
// success
105105
task.addStateChange { taskState ->
106106
when (taskState) {
@@ -126,6 +126,36 @@ aliyunpanClient.buildDownload(defaultDriveId, fileId, { task ->
126126
})
127127
```
128128

129+
### Upload
130+
131+
```
132+
aliyunpanClient.buildUpload(driveId, filePath, { task ->
133+
// success
134+
task.addStateChange { taskState ->
135+
when (taskState) {
136+
BaseTask.TaskState.Abort -> {
137+
}
138+
139+
is BaseTask.TaskState.Completed -> {
140+
}
141+
142+
is BaseTask.TaskState.Failed -> {
143+
}
144+
145+
is BaseTask.TaskState.Running -> {
146+
}
147+
148+
BaseTask.TaskState.Waiting -> {
149+
}
150+
}
151+
}
152+
val startResult = task.start()
153+
}, {
154+
// failure
155+
})
156+
```
157+
158+
129159
## Documents
130160

131161
[Documents](https://alibaba.github.io/aliyunpan-android-sdk/)

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ android {
6464
}
6565

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

0 commit comments

Comments
 (0)