public class XUpdate
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
XUpdate |
debug(boolean isDebug)
设置是否是debug模式
|
static XUpdate |
get()
获取版本更新的入口
|
static android.content.Context |
getContext() |
void |
init(android.app.Application application)
初始化
|
XUpdate |
isAutoMode(boolean isAutoMode)
设置是否是自动版本更新模式【无人干预,有版本更新直接下载、安装】
|
XUpdate |
isGet(boolean isGet)
设置是否使用的是Get请求
|
XUpdate |
isWifiOnly(boolean isWifiOnly)
设置是否只在wifi下进行版本更新检查
|
static UpdateManager.Builder |
newBuild(android.content.Context context)
获取版本更新构建者
|
static UpdateManager.Builder |
newBuild(android.content.Context context,
java.lang.String updateUrl)
获取版本更新构建者
|
XUpdate |
param(java.lang.String key,
java.lang.Object value)
设置全局的apk更新请求参数
|
XUpdate |
params(java.util.Map<java.lang.String,java.lang.Object> params)
设置全局的apk更新请求参数
|
XUpdate |
setApkCacheDir(java.lang.String apkCacheDir)
设置apk的缓存路径
|
XUpdate |
setIFileEncryptor(IFileEncryptor fileEncryptor)
设置文件加密器
|
XUpdate |
setILogger(ILogger logger)
设置日志打印接口
|
XUpdate |
setIUpdateChecker(IUpdateChecker updateChecker)
设置全局版本更新检查
|
XUpdate |
setIUpdateDownLoader(IUpdateDownloader updateDownLoader)
设置全局版本更新下载器
|
XUpdate |
setIUpdateHttpService(IUpdateHttpService updateHttpService)
设置全局版本更新网络请求服务API
|
XUpdate |
setIUpdateParser(IUpdateParser updateParser)
设置全局版本更新的解析器
|
XUpdate |
setIUpdatePrompter(IUpdatePrompter updatePrompter)
设置全局版本更新提示器
|
XUpdate |
setOnInstallListener(OnInstallListener onInstallListener)
设置安装监听
|
XUpdate |
setOnUpdateFailureListener(OnUpdateFailureListener onUpdateFailureListener)
设置更新出错的监听
|
XUpdate |
supportSilentInstall(boolean supportSilentInstall)
设置是否支持静默安装
|
public static XUpdate get()
public void init(android.app.Application application)
application - 应用上下文public static android.content.Context getContext()
public static UpdateManager.Builder newBuild(android.content.Context context)
context - 上下文public static UpdateManager.Builder newBuild(android.content.Context context, java.lang.String updateUrl)
context - 上下文updateUrl - 版本更新检查的地址public XUpdate param(java.lang.String key, java.lang.Object value)
key - 键value - 值public XUpdate params(java.util.Map<java.lang.String,java.lang.Object> params)
params - apk更新请求参数public XUpdate setIUpdateHttpService(IUpdateHttpService updateHttpService)
updateHttpService - 版本更新网络请求服务APIpublic XUpdate setIUpdateChecker(IUpdateChecker updateChecker)
updateChecker - 版本更新检查器public XUpdate setIUpdateParser(IUpdateParser updateParser)
updateParser - 版本更新的解析器public XUpdate setIUpdatePrompter(IUpdatePrompter updatePrompter)
updatePrompter - 版本更新提示器public XUpdate setIUpdateDownLoader(IUpdateDownloader updateDownLoader)
updateDownLoader - 版本更新下载器public XUpdate isGet(boolean isGet)
isGet - 是否使用的是Get请求public XUpdate isWifiOnly(boolean isWifiOnly)
isWifiOnly - 是否只在wifi下进行版本更新检查public XUpdate isAutoMode(boolean isAutoMode)
isAutoMode - 是否是自动版本更新模式public XUpdate setApkCacheDir(java.lang.String apkCacheDir)
apkCacheDir - apk的缓存路径public XUpdate supportSilentInstall(boolean supportSilentInstall)
supportSilentInstall - 是否支持静默安装public XUpdate debug(boolean isDebug)
isDebug - 是否是debug模式public XUpdate setILogger(ILogger logger)
logger - 日志打印接口public XUpdate setIFileEncryptor(IFileEncryptor fileEncryptor)
fileEncryptor - 文件加密器public XUpdate setOnInstallListener(OnInstallListener onInstallListener)
onInstallListener - 安装监听public XUpdate setOnUpdateFailureListener(OnUpdateFailureListener onUpdateFailureListener)
onUpdateFailureListener - 更新出错的监听