android app检测更新,GitHub - bai53229/UpdateDemo: android app自动检测更新库

UpdateFun更新库

UpdateFun是一个fir.im的Android更新下载模块,在fir.im上上传自己的APP后接入该库即可实现检查更新下载

5c3dc39e0cf506eb4356193333a41c35.png

6ac7d2f70ec2f1aad096fd537dca259f.png

33e3f4e6d4b61db0eaaf74673a55f2a1.png

##用法

###Step 1

在gradle文件中加入下面的依赖:

dependencies {

compile 'cn.hugeterry.updatefun:updatefun:1.6.6'

}

如果你使用Maven,那么加入下面的依赖:

cn.hugeterry.updatefun

updatefun

1.6.6

pom

###Step 2

在Application(或者主界面activity中)的onCreate()中加上以下语句进行初始化:

UpdateKey.API_TOKEN = "写上你fir.im账号的API_TOKEN";

UpdateKey.APP_ID = "写上APP的应用ID";

//下载方式:

//UpdateKey.DialogOrNotification=UpdateKey.WITH_DIALOG;通过Dialog来进行下载

//UpdateKey.DialogOrNotification=UpdateKey.WITH_NOTIFITION;通过通知栏来进行下载(默认)

UpdateFunGO.init(this);

###Step 3

在主界面Activity中加上以下语句:

@Override

protected void onResume() {

super.onResume();

UpdateFunGO.onResume(this);

}

@Override

protected void onStop() {

super.onStop();

UpdateFunGO.onStop(this);

}

大功告成,好好享用吧

LICENSE

Copyright 2016 HugeTerry.

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值