Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

AndroidKun/XVersionUpdate

Open more actions menu

Repository files navigation

XVersionUpdate

快速实现版本更新功能

image

1.添加依赖

 compile 'com.androidkun:xversionupdate:1.0.6'

2.调用APII实现版本更新

  VersionUpdateConfig.getInstance()//获取配置实例
       .setContext(MainActivity.this)//设置上下文
       .setDownLoadURL(url)//设置文件下载链接 
       .setNewVersion("1.0.1")//设置即将下载的APK的版本号,避免重复下载
       .setFileSavePath(savePath)//设置文件保存路径(可不设置)
       .setNotificationIconRes(R.mipmap.app_icon)//设置通知图标
       .setNotificationSmallIconRes(R.mipmap.app_icon_small)//设置通知小图标
       .setNotificationTitle("版本升级Demo")//设置通知标题
       .startDownLoad();//开始下载

接下来就不用再做任何处理了,会自动弹出通知显示下载进度并下载完成后会自动跳到安装页面。

About

A quick update version of the framework for Android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.