UpdateFun
dependencies {
compile 'cn.hugeterry.updatefun:updatefun:2.0.6'
}
如果你
<dependency>
<groupId>cn.hugeterry.updatefun</groupId>
<artifactId>updatefun</artifactId>
<version>2.0.6</version>
<type>pom</type>
</dependency>
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);
@Override
protected void onResume() {
super.onResume();
UpdateFunGO.onResume(this);
}
@Override
protected void onStop() {
super.onStop();
UpdateFunGO.onStop(this);
}
android {
defaultConfig {
...
resValue "string", "updatefun_provider_file_authorities", "<packageName>.fileprovider"
}
}
<packageName>
为你
手 动更新 (需1.8.4以上 版本 )案 例 代 码
请确
UpdateFunGO.manualStart(this);
并在
@Override
protected void onResume() {
super.onResume();
UpdateFunGO.onResume(this);
}
@Override
protected void onStop() {
super.onStop();
UpdateFunGO.onStop(this);
}
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.