UpdateFun UpdateFun更新库<a href="https://github.com/hugeterry/UpdateDemo#%E7%94%A8%E6%B3%95"></a>用法<a href="https://github.com/hugeterry/UpdateDemo#step-3"></a>Step 3 fir.im的Android更新下载模块

程序名称:UpdateFun UpdateFun更新库<a href="https://github.com/hugeterry/UpdateDemo#%E7%94%A8%E6%B3%95"></a>用法<a href="https://github.com/hugeterry/UpdateDemo#step-3"></a>Step 3

授权协议: Apache

操作系统: Android

开发语言: Java

UpdateFun UpdateFun更新库<a href="https://github.com/hugeterry/UpdateDemo#%E7%94%A8%E6%B3%95"></a>用法<a href="https://github.com/hugeterry/UpdateDemo#step-3"></a>Step 3 介绍

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

UpdateFun UpdateFun更新库<a href="https://github.com/hugeterry/UpdateDemo#%E7%94%A8%E6%B3%95"></a>用法<a href="https://github.com/hugeterry/UpdateDemo#step-3"></a>Step 3 官网

https://github.com/hugeterry/UpdateDemo

相关编程语言

BBGestureBack Full screen return gesture(全屏手...
Framework7 或者叫 F7 是全功能的绑定 iOS 7 应用的...
iOS 调试库,支持 iOS8+,无需添加任何代码,方便 i...
DarkModeKit是在Apple官方的深色模式发布之前设计和...
SimpleNote iOS 版客户端。SimpleNote 是一款在多平...
Kivy iOS,此工具旨在为 iOS 编译必要的库以运行应用...