https://github.com/tryzealot/zealot-android
Zealot SDK for Android
https://github.com/tryzealot/zealot-android
android-sdk jitpack version-check zealot
Last synced: 6 months ago
JSON representation
Zealot SDK for Android
- Host: GitHub
- URL: https://github.com/tryzealot/zealot-android
- Owner: tryzealot
- License: mit
- Created: 2020-01-08T12:19:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T04:02:48.000Z (about 2 years ago)
- Last Synced: 2025-01-31T14:42:52.736Z (over 1 year ago)
- Topics: android-sdk, jitpack, version-check, zealot
- Language: Kotlin
- Homepage: https://zealot.ews.im
- Size: 133 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zealot Android SDK
Android 组件提供为 Zealot 检查新版本和安装的服务,支持 Kotlin 和 Java。
## 安装
### JitPack
使用 [jitpack](https://jitpack.io) 安装,先需要添加 maven 仓库:
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
之后在主 app 项目的 `build.gradle` 添加 zealot:
```groovy
dependencies {
implementation 'com.github.tryzealot:zealot-android:master-SNAPSHOT'
}
```
## 使用
在你的 `Application` 文件的 `onCreate` 方法添加启动代码:
```kotlin
// Kotlin
// 单个渠道
Zealot.create(getActivity())
.setEndpoint("https://zealot.com")
.setChannelKey("...")
.setBuildType(BuildConfig.BUILD_TYPE)
.launch()
// 多个渠道,比如测试版本,内测版本
Zealot.create(getActivity())
.setEndpoint("https://zealot.com")
.setChannelKey("xxxxxxx", "beta")
.setCHannelKey("yyyyyyy", "test")
.setBuildType(BuildConfig.BUILD_TYPE)
.launch()
```
```java
// Java
// 单个渠道
Zealot.create(getActivity())
.setEndpoint("https://zealot.com")
.setChannelKey("...")
.setBuildType(BuildConfig.BUILD_TYPE)
.launch();
// 多个渠道,比如测试版本,内测版本
Zealot.create(getActivity())
.setEndpoint("https://zealot.com")
.setChannelKey("xxxxxxx", "beta")
.setCHannelKey("yyyyyyy", "test")
.setBuildType(BuildConfig.BUILD_TYPE)
.launch();
```
## 注意
使用 Zealot SDK 需要开启网络权限
```xml
```
## Author
icyleaf, icyleaf.cn@gmail.com
## License
Zealot is available under the MIT license. See the LICENSE file for more info.