更新了upload-sdk

增加了setAuthPubKey
This commit is contained in:
董宏宇
2021-02-01 14:48:47 +08:00
parent 1147a3dac9
commit 9455480d1b
3 changed files with 26 additions and 2 deletions

View File

@@ -25,6 +25,10 @@ public class MoGoAiCloudClientConfig {
* APP key
*/
private String thirdPartyAppKey = "";
/**
* 可选有则传有默认值为后续扩展使用第三方车机可能使用自定义的pub_key, 此key由server端分配
*/
private String authPubKey = "";
/**
* 签名信息
@@ -102,6 +106,24 @@ public class MoGoAiCloudClientConfig {
this.thirdPartyAppKey = thirdPartyAppKey;
}
/**
* 获取授权公钥匙
*
* @return 授权公钥匙
*/
public String getAuthPubKey() {
return authPubKey;
}
/**
* 设置授权公钥匙
*
* @param authPubKey 授权公钥匙
*/
public void setAuthPubKey(String authPubKey) {
this.authPubKey = authPubKey;
}
/**
* 获取AI云平台分配给三方应用的签名密钥需要从AI云平台申请
*
@@ -289,6 +311,7 @@ public class MoGoAiCloudClientConfig {
"sNetMode=" + sNetMode +
", thirdPartyDeviceId='" + thirdPartyDeviceId + '\'' +
", thirdPartyAppKey='" + thirdPartyAppKey + '\'' +
", authPubKey='" + authPubKey + '\'' +
", thirdPartySignSecret='" + thirdPartySignSecret + '\'' +
", thirdLogin=" + thirdLogin +
", isShowDebugLog=" + isShowDebugLog +

View File

@@ -27,9 +27,9 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// 长链
api 'com.zhidao.socket:built-in-socket:1.0.21'
api 'com.zhidao.socket:built-in-socket:1.0.22'
// 上报位置
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.8'
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.9'
if (Boolean.valueOf(RELEASE)) {
implementation "com.mogo.cloud:passport:${MOGO_PASSPORT_VERSION}"

View File

@@ -88,6 +88,7 @@ public class SocketManager implements IMogoCloudSocketManager, Callback {
.setOpenAnalytics(true)
.setSn(cloudClientConfig.getSn())
.setToken(cloudClientConfig.getToken())
.setAuthPubKey(cloudClientConfig.getAuthPubKey())
.setDebug(cloudClientConfig.isShowDebugLog());
SocketClient.getInstance().start(context);
}