Skip to content

Commit

Permalink
优化readme
Browse files Browse the repository at this point in the history
  • Loading branch information
azhon committed Feb 21, 2020
1 parent 4f45f96 commit 628714b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
22 changes: 11 additions & 11 deletions README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,17 @@ implementation 'com.azhon:appupdate:2.8.0'
implementation 'com.azhon:appupdateX:2.8.0'
```

#### Step2:Create `DownloadManager`,For more usage, please see [sample code here](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java)
#### Step2:Compatible with Android N and above,Add the following code to your app's `build.gradle`

```java
defaultConfig {

//Each application has different authorities, preventing the same cannot be installed on the same phone at the same time
resValue "string", "authorities", applicationId
}
```

#### Step3:Create `DownloadManager`,For more usage, please see [sample code here](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java)

```java
DownloadManager manager = DownloadManager.getInstance(this);
Expand All @@ -112,16 +122,6 @@ manager.setApkName("appupdate.apk")
.download();
```

#### Step3:Compatible with Android N and above,Add the following code to your app's `build.gradle`

```java
defaultConfig {

//Each application has different authorities, preventing the same cannot be installed on the same phone at the same time
resValue "string", "authorities", applicationId
}
```

#### Step4:ProGuard Rules

```groovy
Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,17 @@ implementation 'com.azhon:appupdate:2.8.0'
```groovy
implementation 'com.azhon:appupdateX:2.8.0'
```
#### 第二步:兼容Android N 及以上版本,在你应用的`build.gradle`添加如下代码

#### 第二步:创建`DownloadManager`,更多用法请查看[这里示例代码](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java)
```java
defaultConfig {

//每个应用拥有不同的authorities,防止相同的在同一个手机上无法同时安装
resValue "string", "authorities", applicationId
}
```

#### 第三步:创建`DownloadManager`,更多用法请查看[这里示例代码](https://github.com/azhon/AppUpdate/blob/master/app/src/main/java/com/azhon/app/MainActivity.java)

```java
DownloadManager manager = DownloadManager.getInstance(this);
Expand All @@ -118,16 +127,6 @@ manager.setApkName("appupdate.apk")
.download();
```

#### 第三步:兼容Android N 及以上版本,在你应用的`build.gradle`添加如下代码

```java
defaultConfig {

//每个应用拥有不同的authorities,防止相同的在同一个手机上无法同时安装
resValue "string", "authorities", applicationId
}
```

#### 第四步:混淆打包,只需保持`Activity``Service`不混淆

```groovy
Expand Down

0 comments on commit 628714b

Please sign in to comment.