Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version to v8.8.0 #512

Merged
merged 54 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1f364ad
Merge pull request #475 from YangSen-qn/http3
xwen-winnie Dec 10, 2021
ef8169f
change uc query retry host order
Jul 19, 2023
bc3f3dc
Merge branch 'master' of YangSen-qn:qiniu/android-sdk into remove-reg…
Jul 20, 2023
112ff06
change test case
Jul 21, 2023
8193846
change test case
Jul 24, 2023
a052eb6
Merge branch 'master' of YangSen-qn:qiniu/android-sdk into remove-reg…
Jul 27, 2023
027d9ba
change mvn_push
Jul 31, 2023
47f87a6
update test token
Jul 31, 2023
21fff24
change gradle.properties: config jvm
Aug 1, 2023
5f060f7
change test case
Aug 2, 2023
4600249
Merge branch 'master' of YangSen-qn:qiniu/android-sdk into fix-publish
Aug 2, 2023
13ba1e5
update mvn_push.gradle
Aug 2, 2023
8608aa2
update test case
Aug 2, 2023
5d73445
version to 8.6.0
Aug 7, 2023
4ddce97
Merge branch 'fix-publish'
Aug 7, 2023
0f28b16
change publish
Oct 9, 2023
8a0b360
fix zone add createZonesInfo
Oct 11, 2023
06c6ae7
update android gradle plugin
Oct 11, 2023
ae58017
Merge branch 'master' of YangSen-qn:qiniu/android-sdk into fixzone
Oct 12, 2023
99a8f69
change publish
Oct 12, 2023
54c3003
add Cache - part 1
Oct 12, 2023
64d0057
auto zone support disk cache
Oct 19, 2023
b876c6b
optimize upload run
Oct 20, 2023
0d746d3
change test case
Oct 20, 2023
d96a439
change test token
Oct 20, 2023
cccaef5
change test case
Oct 20, 2023
546892a
Merge branch 'develop' of YangSen-qn:qiniu/android-sdk into query-dis…
Oct 24, 2023
21e3a11
Merge branch 'master' of YangSen-qn:qiniu/android-sdk into query-disk…
Oct 24, 2023
71e44cf
optimize some code
Oct 25, 2023
21f38d4
auto zone build date
Nov 3, 2023
79a7e12
cache timestamp unit to S
Nov 6, 2023
f48c2ca
uc query add host: uc.qiniuapi.com
Nov 13, 2023
e49840e
Merge branch 'master' of YangSen-qn:qiniu/android-sdk into uc-query-a…
Nov 13, 2023
fe832a3
change http scheme logic
Nov 16, 2023
16d92e0
change setHostScheme
Nov 16, 2023
5f22804
version to 8.7.0
Nov 23, 2023
4132537
Merge branch 'master' of YangSen-qn:qiniu/android-sdk
Nov 23, 2023
190d736
Merge branch 'master' of YangSen-qn:qiniu/android-sdk
Nov 27, 2023
e1ed20d
add some doc
Nov 27, 2023
3340c3e
add some doc
Nov 28, 2023
1e41eed
change some doc
Nov 29, 2023
b582e31
hidden some doc
Nov 30, 2023
7b27280
remove useless code
Nov 30, 2023
b091623
change javadoc
Nov 30, 2023
aa679cc
change doc
Nov 30, 2023
03355a3
optimize some code
Dec 7, 2023
5febea7
Merge branch 'multi-region'
Dec 7, 2023
1a697ee
delete useless code
Dec 11, 2023
0b32ed1
feature: support acc
May 24, 2024
96e5b12
Merge branch 'master' of YangSen-qn:qiniu/android-sdk
May 24, 2024
8557029
optimize some code
May 27, 2024
47179ca
change dns test
May 28, 2024
256b96a
version to v8.8.0
Jun 24, 2024
74127ef
Merge
Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#Changelog
## 8.8.0(2024-06-24)
* 增加
* 上传支持加速域名
* 调整
* 查询区域移除备用域名:api.qiniu.com

## 8.7.0(2023-11-23)
* 调整:
* 自动获取的区域信息结果缓存增加磁盘缓存
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ https://github.com/qiniudemo/qiniu-lab-android

| Qiniu SDK 版本 | 最低 Android版本 | 依赖库版本 |
|--------------|-----------------|------------------------|
| 8.8.x | Android 4.0+ | okhttp 4+ |
| 8.7.x | Android 4.0+ | okhttp 4+ |
| 8.6.x | Android 4.0+ | okhttp 4+ |
| 8.5.x | Android 4.0+ | okhttp 4+ |
Expand All @@ -36,7 +37,7 @@ https://github.com/qiniudemo/qiniu-lab-android
| 7.0.7 | Android 2.2+ | android-async-http 1.4.8 |

### 注意
* 推荐使用最新版:8.7.0
* 推荐使用最新版:8.8.0
* 7.6.2 ~ 8.3.2 AndroidNetwork.getMobileDbm()可以获取手机信号强度,需要如下权限(API>=18时生效)
```
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Expand All @@ -55,10 +56,10 @@ https://github.com/qiniudemo/qiniu-lab-android
* Android Studio中添加dependencies 或者 在项目中添加maven依赖
```
// 1. 直接导入
implementation 'com.qiniu:qiniu-android-sdk:8.7.+'
implementation 'com.qiniu:qiniu-android-sdk:8.8.+'

// 2. 如果要修改okhttp依赖的版本,可采用以下方式(强烈建议使用七牛库依赖的okhttp版本)
implementation ('com.qiniu:qiniu-android-sdk:8.7.+'){
implementation ('com.qiniu:qiniu-android-sdk:8.8.+'){
exclude (group: 'com.squareup.okhttp3', module: 'okhttp')
}
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public final class Constants {
/**
* SDK 版本号
*/
public static final String VERSION = "8.7.0";
public static final String VERSION = "8.8.0";

/**
* UTF-8 编码
Expand Down
8 changes: 8 additions & 0 deletions library/src/main/java/com/qiniu/android/common/FixedZone.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ private FixedZone(String[] upDomains, String[] oldUpDomains, String regionId) {
this.zonesInfo = createZonesInfo(upDomains, oldUpDomains, regionId);
}

/**
* 构造方法
*
* @param accUpDomains 加速域名
* @param upDomains 上传域名
* @param oldUpDomains 支持 SNI 的域名
* @param regionId 区域 ID
*/
public FixedZone(String[] accUpDomains,String[] upDomains, String[] oldUpDomains, String regionId) {
this.zonesInfo = createZonesInfo(accUpDomains, upDomains, oldUpDomains, regionId);
}
Expand Down
1 change: 1 addition & 0 deletions library/src/main/java/com/qiniu/android/common/Zone.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public interface QueryHandlerV2 {
*
* @param responseInfo 查询响应
* @param metrics 查询指标
* @param zonesInfo 区域信息
*/
void complete(ResponseInfo responseInfo, UploadRegionRequestMetrics metrics, ZonesInfo zonesInfo);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,11 @@ public boolean isCtxExpiredError() {
return statusCode == 701 || (statusCode == 612 && error != null && error.contains("no such uploadId"));
}

/**
* 是否是加速配置错误
*
* @return 是否是加速配置错误
*/
public boolean isTransferAccelerationConfigureError() {
if (error == null) {
return false;
Expand Down
10 changes: 10 additions & 0 deletions library/src/main/java/com/qiniu/android/utils/ListUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

import java.util.List;

/**
* List 工具类
*/
public class ListUtils {

/**
* 判断 List 是否为空
*
* @param objects List
* @return 是否为空
* @param <T> List 中的元素类型
*/
public static <T> boolean isEmpty(List<T> objects) {
return objects == null || objects.isEmpty();
}
Expand Down
12 changes: 12 additions & 0 deletions library/src/main/java/com/qiniu/android/utils/MapUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@

import java.util.Map;

/**
* Map 工具类
*/
public class MapUtils {

/**
* 判断 Map 是否为空
*
* @param objects Map
* @return 是否为空
* @param <K> key 类型
* @param <V> value 类型
*/
public static <K,V> boolean isEmpty(Map<K,V> objects) {
return objects == null || objects.isEmpty();
}
Expand Down
Loading