(Translated by https://www.hiragana.jp/)
GitHub - hugeterry/UpdateFun: Android APP update library./android app自动检测更新库
Skip to content

Android APP update library./android app动检测更しん

License

Notifications You must be signed in to change notification settings

hugeterry/UpdateFun

Repository files navigation

UpdateFun更新こうしん

UpdateFunいちfir.imてきAndroid更新こうしん载模块,ざいfir.im上上じょうじょう自己じこてきAPPきさきせっにゅう该库そく实现检查更新こうしん

License Download

用法ようほう

Step 1

ざいgradleぶんけんちゅう加入かにゅう下面かめんてき赖:

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

如果你使用しようMaven,加入かにゅう下面かめんてき赖:

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

Step 2

ざいしゅ界面かいめんactivityてきonCreate()ちゅうじょう以下いか语句进行はつはじめ(请放ざいsetContentView()方法ほうほうてききさきめん):

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

Step 4 (2.0.6以上いじょう版本はんぽん必须けんようAndroid 7.0+,Android 7.0てきつくえ也要)

ざいappぶんけん夹下てきbuild.gradleさと添加てんか:

android {
    defaultConfig {
        ...
        resValue "string", "updatefun_provider_file_authorities", "<packageName>.fileprovider"
    }
}

<packageName>为你てき应用つつみめい

大功たいこうつげなりこうこうとおるよう

其他こうのう

更新こうしん(需1.8.4以上いじょう版本はんぽんあんれいだい

请确ざい你的appやめ添加てんか赖(见用ほうStep 1), 并已经写じょう你fir.im账号てきAPI_TOKEN以及APPてき应用ID(见用ほうStep 2)

ざい需要じゅようしゅ动更しん时调よう:

UpdateFunGO.manualStart(this);

并在しゅ更新こうしんてきとうぜんActivity添加てんかじょう以下いかだい码:

 @Override
    protected void onResume() {
        super.onResume();
        UpdateFunGO.onResume(this);
    }
  @Override
     protected void onStop() {
         super.onStop();
         UpdateFunGO.onStop(this);
     }

そく实现しゅ更新こうしん

Demo

http://fir.im/updatefun

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.

About

Android APP update library./android app动检测更しん

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages