fir.im的Android更新下载模块 UpdateFun

码农软件 · 软件分类 · 手机开发包 · 2019-05-04 18:14:29

软件介绍

UpdateFun更新库

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

  

用法

Step 1

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

dependencies {
    compile 'cn.hugeterry.updatefun:updatefun:1.6.6'
}

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

<dependency>
  <groupId>cn.hugeterry.updatefun</groupId>
  <artifactId>updatefun</artifactId>
  <version>1.6.6</version>
  <type>pom</type>
</dependency>

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

大功告成,好好享用吧

Demo

http://fir.im/updatefun

本文地址:https://codercto.com/soft/d/5021.html

软件测试

软件测试

[美]Ron Patton / 张小松、王珏、曹跃 / 机械工业出版社 / 2006-4 / 30.00元

软件测试(原书第2版),ISBN:9787111185260,作者:(美)佩腾(Patton,R.) 著,张小松 等译;张小松译一起来看看 《软件测试》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具