public class ServiceSettings
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
CHINESE
中文
Chinese |
static java.lang.String |
ENGLISH
英文
English |
static int |
HTTP
Http协议。
|
static int |
HTTPS
Https协议。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroyInnerAsynThreadPool()
销毁搜索异步搜索线程池,会调用内部线程池的shutdown方法
之后在调用各搜索的异步接口 如
PoiSearch.searchPOIAsyn() 还会自动新建线程池
Destroy the asynchronous search thread pool for search, which will call the shutdown method of the internal thread pool. |
int |
getConnectionTimeOut()
返回搜索服务建立连接超时限制。
|
static ServiceSettings |
getInstance()
初始化ServiceSettings的单例对象。
|
java.lang.String |
getLanguage()
搜索、地理/逆地理编码、输入提示的返回结果语言类型,中英文。
|
int |
getProtocol()
返回访问使用的协议类别
Return the protocol category used for access. |
int |
getSoTimeOut()
读取返回结果超时限制
Timeout limit for reading returned results |
boolean |
isHttpDnsEnabled()
返回进程级共享 HTTPDNS 是否已开启。
|
void |
setApiKey(java.lang.String apiKey)
动态设置apiKey。
|
void |
setConnectionTimeOut(int connectionTimeout)
设置搜索服务建立连接超时。
|
boolean |
setHttpDnsEnabled(boolean enabled)
设置是否启用 HTTPDNS,默认关闭。
|
void |
setLanguage(java.lang.String language)
设置搜索、地理/逆地理编码、输入提示语言切换的接口。
|
void |
setProtocol(int protocol)
设置访问使用的协议类别。
|
void |
setSoTimeOut(int soTimeOut)
设置搜索读取返回结果超时。
|
static void |
updatePrivacyAgree(android.content.Context context,
boolean isAgree)
更新同意隐私状态,需要在初始化地图之前完成
Update the consent privacy status, which needs to be completed before initializing the map. |
static void |
updatePrivacyShow(android.content.Context context,
boolean isContains,
boolean isShow)
更新隐私合规状态,需要在初始化地图之前完成
Update the privacy compliance status, which needs to be completed before initializing the map. |
public static final java.lang.String ENGLISH
setLanguage(String),
常量字段值public static final java.lang.String CHINESE
setLanguage(String),
常量字段值public static final int HTTP
public static final int HTTPS
public int getConnectionTimeOut()
public int getSoTimeOut()
public void setConnectionTimeOut(int connectionTimeout)
connectionTimeout - 毫秒级参数。
public void setSoTimeOut(int soTimeOut)
soTimeOut - 毫秒级参数。
public static ServiceSettings getInstance()
public void setLanguage(java.lang.String language)
public boolean setHttpDnsEnabled(boolean enabled)
enabled - true 启用,false 关闭
public boolean isHttpDnsEnabled()
public void setProtocol(int protocol)
protocol - 包含Http和Https两种协议。
public java.lang.String getLanguage()
public int getProtocol()
public void setApiKey(java.lang.String apiKey)
apiKey - 在高德官网上申请的apiKey。
public void destroyInnerAsynThreadPool()
PoiSearch.searchPOIAsyn() 还会自动新建线程池
PoiSearch.searchPOIAsyn(), a new thread pool will be automatically created.public static void updatePrivacyShow(android.content.Context context,
boolean isContains,
boolean isShow)
context: - 上下文
isContains: - 隐私权政策是否包含高德开平隐私权政策 true是包含
isShow: 隐私权政策是否弹窗展示告知用户 true是展示 - public static void updatePrivacyAgree(android.content.Context context,
boolean isAgree)
context: - 上下文
isAgree: - 隐私权政策是否取得用户同意 true是用户同意