Code Monkey home page Code Monkey logo

appupdate's Introduction

Android 版本更新

目录

功能介绍

  • 实现android版本更新
  • 对kotlin适配,调用更简单
  • 自定义接口协议,可以不改变现有项目的协议就能使用
  • 支持get,post请求
  • 支持进度显示,对话框进度条,和通知栏进度条展示
  • 支持后台下载
  • 支持强制更新
  • 支持简单主题色配置(可以自动从顶部图片提取主色)
  • 支持自定义对话框(可以监听下载进度)
  • 支持静默下载(可以设置wifi状态下)
  • 支持android7.0

效果图与示例 apk

点击下载 Demo.apk 或扫描下面的二维码安装

Demo apk文件二维

Gradle 依赖

java方式引用

dependencies {
    compile 'com.qianwen:update-app:3.3.0'
}

Download API License GitHub stars

kotlin方式引用

dependencies {
    compile 'com.qianwen:update-app-kotlin:1.0.1'
}

Download API License GitHub stars

简单使用

1,java方式

	new UpdateAppManager
                .Builder()
                //当前Activity
                .setActivity(this)
                //更新地址
                .setUpdateUrl(mUpdateUrl)
                //实现httpManager接口的对象
                .setHttpManager(new UpdateAppHttpUtil())
                .build()
                .update();

2,kotlin方式

	updateApp(mUpdateUrl, UpdateAppHttpUtil()).update()

详细说明

进度条使用的是代码家的「NumberProgressBar

更新日志

V3.3.0

1,可以设置不显示通知栏进度条。
2,可以设置忽略版本。 
3,优化下载时页面卡的问题(由于下载进度回调调用频繁,造成ui线程阻塞)。
4,可以静默下载,类似网易云音乐,并且设置wifi状态下。

V3.2.9

1,新增自定义对话框。
2,适配kotlin,写法更简单。 

License

Copyright 2017 千匍

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

appupdate's People

Contributors

wvector 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.