Giter Site home page Giter Site logo

appupdate's Introduction

AppUpdate

##介绍:一个APP更新库 ###功能简介

    版本检查

    从后台的指定连接下载最新的安装包

    软件安装(首先检查文件是否完整)

    根据服务器返回的数据判断是否强制更新(强制更新时,取消更新会延时退出退出)

###示例

 AppUpdater appUpdater1 = new AppUpdater
		//参数1:Context,2:后台的json地址
                    .Builder(this,"http://xxpbox.cn/app/yangyan/appUpdate")
		//对话框是否显示
                    .setShowToDialog(false)
		//是否在状态栏显示
                    .setShowToStatusBar(true)
                    .build();
            CheckUpdater.getInstance().init(appUpdater1);

###参数配置

//上下文参数
private final Context context;
//状态栏显示
private final boolean showToStatusBar;
//对话框显示(默认为该放式显示)
private final boolean showToDialog;
//更新后自动删除安装包
private final boolean autoDel;
//下载方式采用系统的DownloadManager
private final boolean userDownloadManager;
//是否使用库默认更新提示对话框
private final boolean defaultDialog;
//存储的地址
private final String filePath;
//文件的名字
private final String appName;
//地址
private final String url;

###后台json格式

{
"versionCode":版本号,整形,
"versionName":"版本名",
"describe":"版本描述",
"constraint":布尔值,
"url":"最新的app的安装包的下载地址"
}

appupdate's People

Contributors

miaomiaodashi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.