-
Notifications
You must be signed in to change notification settings - Fork 6
Change Log
Marsad Maqsood edited this page Mar 19, 2022
·
4 revisions
- Updated
compileSdkVersion
to 32
-
Added
setUpdateTitle
to change update dialog title text. -
Added
setUpdateContentText
to change update dialog content text.setUpdateTitle("Update Title") setUpdateContentText("Update Content Text")
UpdateWrapper updateWrapper = new UpdateWrapper.Builder(this)
...
.setUpdateTitle("Custom Title")
.setUpdateContentText("Content Text Here")
...
.build();
updateWrapper.start();
Added setDownloadDialogTitle
to change download dialog title text.
setDownloadDialogTitle("String title")
UpdateWrapper updateWrapper = new UpdateWrapper.Builder(this)
...
.setDownloadDialogTitle("Title Here")
...
.build();
updateWrapper.start();
setTime(long miliseconds)
setUrl(String url)
setNotificationIcon(drawable icon)
setToastMsg(String message)
setIsShowBackgroundDownload(boolean value)
setIsShowNetworkErrorToast(boolean value)
setIsShowToast(boolean value)
setCustomsActivity(class cls)
setCallback(CheckUpdateTask.Callback calback)
UpdateWrapper updateWrapper = new UpdateWrapper.Builder(this)
//set time in millisecounds
.setTime(3000)
//set notification icon
.setNotificationIcon(R.mipmap.ic_launcher)
//set update file url
.setUrl("https://marsad.ml/update.json")
//set customs activity
.setCustomsActivity(cls)
//set showToast. default is true
.setIsShowToast(false)
//add callback ,return new version info
.setCallback((model, hasNewVersion) -> {
Log.d("Latest Version", hasNewVersion + "");
Log.d("Version Name", model.getVersionName());
Log.d("Version Code", model.getVersionCode() + "");
Log.d("Version Description", model.getContent());
Log.d("Min Support", model.getMinSupport() + "");
Log.d("Download URL", model.getUrl());
})
.build();
updateWrapper.start();