https://github.com/wenwenwen888/BackgroundUpdate
  
  
    后台更新APP(两句代码实现) 
    https://github.com/wenwenwen888/BackgroundUpdate
  
apk backgroundupdate dialog notifications retrofit rxjava update
        Last synced: 7 months ago 
        JSON representation
    
后台更新APP(两句代码实现)
- Host: GitHub
 - URL: https://github.com/wenwenwen888/BackgroundUpdate
 - Owner: wenwenwen888
 - Archived: true
 - Created: 2017-04-25T09:06:37.000Z (over 8 years ago)
 - Default Branch: master
 - Last Pushed: 2017-05-12T12:36:18.000Z (over 8 years ago)
 - Last Synced: 2024-08-02T01:25:15.011Z (over 1 year ago)
 - Topics: apk, backgroundupdate, dialog, notifications, retrofit, rxjava, update
 - Language: Java
 - Homepage:
 - Size: 258 KB
 - Stars: 78
 - Watchers: 3
 - Forks: 14
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 
 
Awesome Lists containing this project
- awesome-github-android-ui - BackgroundUpdate - 后台更新APP (升级更新)
 
README
          # BackgroundUpdate
后台更新APP(两句代码实现)
先看预览图 : 
(1)调用Dialog更新对话框效果

(2)调用Notification更新效果

前言
-------
1,使用了retorfit2 + rxjava做的下载库
2,apk下载完毕会自动跳到安装界面,下载过程可取消
3,需要修改更多内容可以下载library自行修改
4,不妥之处或BUG请Issues指出,谢谢
Usage
--------
With Gradle:
```groovy
  compile 'com.wenwenwen888:bgupdate:1.0.7'
```
How to use
--------
第一句 , 调用下载:
* (a.调用Dialog对话框下载
```java
  BgUpdate.updateForDialog(context, url, filePath);
```
* (b.调用Notification下载
```java
  BgUpdate.updateForNotification(context , url, filePath);
```
* (c.url即为下载apk的链接,下面为filepath示例
```java
  String filePath = Environment.getExternalStorageDirectory() + "/xxx.apk";
```
第二句 , 在onDestroy()的时候关闭服务:
```java
 BgUpdate.closeService(context);
```
End (。・`ω´・)
--------