Skip to content

Change Log

Marsad Maqsood edited this page Mar 19, 2022 · 4 revisions

What's in 0.1.3

  • Updated compileSdkVersion to 32

What's in 0.1.2

  • Added setUpdateTitle to change update dialog title text.

  • Added setUpdateContentText to change update dialog content text.

    setUpdateTitle("Update Title")
    setUpdateContentText("Update Content Text")
    

How to Use

    UpdateWrapper updateWrapper = new UpdateWrapper.Builder(this)
            ...
            .setUpdateTitle("Custom Title")
            .setUpdateContentText("Content Text Here")
            ...
            .build();

    updateWrapper.start();

What's in 0.1.1

Added setDownloadDialogTitle to change download dialog title text.

setDownloadDialogTitle("String title")

How to Use

    UpdateWrapper updateWrapper = new UpdateWrapper.Builder(this)
            ...
            .setDownloadDialogTitle("Title Here")
            ...
            .build();

    updateWrapper.start();

What's in 0.1.0

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)

How to Use

    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();

Clone this wiki locally