6 Star 0 Fork 0

hihopeorg / CheckVersionLib

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

CheckVersionLib

本项目是基于开源项目CheckVersionLib进行ohos化的移植和开发的,可以通过项目标签以及github地址(https://github.com/AlexLiuSheng/CheckVersionLib )追踪到原项目版本

项目介绍

  • 项目名称:CheckVersionLib
  • 所属系列:ohos的第三方组件适配移植
  • 功能:自动版本检测并更新库。请求下载,并注册监听返回下载转态,版本检查,并自动安装,自定义页面弹框。
  • 项目移植状态:完成
  • 调用差异:不支持版本检查,并自动安装,自定义页面弹框
  • 项目作者和维护人:hihope
  • 联系方式:hihope@hoperun.com
  • 原项目Doc地址:https://github.com/AlexLiuSheng/CheckVersionLib
  • 原项目基线版本:v2.4_appcompat ,sha1: 88b1ce8d4353fd1ca156a2214503404f83a26ed7
  • 编程语言:Java
  • 外部库依赖:okhttp

展示效果

avatar

安装教程

方法1.

  1. 下载弹幕库har包CheckVersionLib_ohos.har。
  2. 启动 DevEco Studio,将下载的har包,导入工程目录“entry->libs”下。
  3. 在moudle级别下的build.gradle文件中添加依赖,在dependences标签中增加对libs目录下har包的引用。
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
	……
}
  1. 在导入的har包上点击右键,选择“Add as Library”对包进行引用,选择需要引用的模块,并点击“OK”即引用成功。

方法2.

  1. 在工程的build.gradle的allprojects中,添加HAR所在的Maven仓地址
repositories {
    maven {
        url 'http://106.15.92.248:8081/repository/Releases/' 
    }
}
  1. 在应用模块的build.gradle的dependencies闭包中,添加如下代码:
dependencies {
    implementation 'com.github.AlexLiuSheng.ohos:CheckVersionLib:1.0.1'
}

使用说明

1.在任意地方开启自定义service,并传入VersionParam

 ```
 VersionParams.Builder builder = new VersionParams.Builder()
       .setRequestUrl("http://www.baidu.com")
       .setService(DemoService.class);
       
 AllenChecker.startVersionCheck(this, builder.build());
 ```

2.需要实现并注册APKDownloadListener接口

DownloadManager mDownloadManager = new DownloadManager();
mDownloadManager.setApkDownloadListener(new APKDownloadListener() )    

版本迭代

  • v1.0.1

版权和许可信息

License

Copyright 2017 AllenLiu.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you 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.

Empty file

About

Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/hihopeorg/CheckVersionLib.git
git@gitee.com:hihopeorg/CheckVersionLib.git
hihopeorg
CheckVersionLib
CheckVersionLib
master

Search