Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
281 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
SensorsAnalyticsSDK/src/main/java/com/sensorsdata/analytics/android/sdk/SAConfigOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/**Created by dengshiwei on 2019/03/11. | ||
* Copyright © 2015-2019 Sensors Data Inc. All rights reserved. */ | ||
|
||
package com.sensorsdata.analytics.android.sdk; | ||
|
||
public final class SAConfigOptions { | ||
/** | ||
* 请求配置地址,默认从 ServerUrl 解析 | ||
*/ | ||
private String remoteConfigUrl; | ||
|
||
/** | ||
* 数据上报服务器地址 | ||
*/ | ||
private String serverUrl; | ||
|
||
/** | ||
* 私有构造函数 | ||
*/ | ||
private SAConfigOptions(){} | ||
|
||
/** | ||
* 获取 SAOptionsConfig 实例 | ||
* @param serverUrl,数据上报服务器地址 | ||
*/ | ||
public SAConfigOptions(String serverUrl) { | ||
this.serverUrl = serverUrl; | ||
} | ||
|
||
/** | ||
* 设置远程配置请求地址 | ||
* @param remoteConfigUrl,远程配置请求地址 | ||
* @return SAOptionsConfig | ||
*/ | ||
public SAConfigOptions setRemoteConfigUrl(String remoteConfigUrl) { | ||
this.remoteConfigUrl = remoteConfigUrl; | ||
return this; | ||
} | ||
|
||
/** | ||
* 设置数据上报地址 | ||
* @param serverUrl,数据上报地址 | ||
* @return SAOptionsConfig | ||
*/ | ||
public SAConfigOptions setServerUrl(String serverUrl) { | ||
this.serverUrl = serverUrl; | ||
return this; | ||
} | ||
|
||
String getRemoteConfigUrl() { | ||
return remoteConfigUrl; | ||
} | ||
|
||
String getServerUrl() { | ||
return serverUrl; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.