Skip to content

Commit

Permalink
release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Justson committed Aug 27, 2017
1 parent deeda46 commit 96d23c2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ WebView 可谓是每个应用必备的一个控件了 ,但是它不是一个
* Gradle

```
compile 'com.just.agentweb:agentweb:1.2.6'
compile 'com.just.agentweb:agentweb:2.0.0'
```
* Maven

```
<dependency>
<groupId>com.just.agentweb</groupId>
<artifactId>agentweb</artifactId>
<version>1.2.6</version>
<version>2.0.0</version>
<type>pom</type>
</dependency>

Expand Down Expand Up @@ -205,6 +205,20 @@ AgentWebConfig.syncCookie("http://www.jd.com","ID=XXXX")
```
String cookies=AgentWebConfig.getCookiesByUrl(targetUrl);
```
* #### 权限拦截
```
protected PermissionInterceptor mPermissionInterceptor = new PermissionInterceptor() {
//AgentWeb 在触发某些敏感的 Action 时候会回调该方法, 比如定位触发 。
//例如 http//:www.taobao.com 该 Url 需要定位权限, 返回false ,如果版本大于等于23 , agentWeb 会动态申请权限 ,true 该Url对应页面请求定位失败。
//该方法是每次都会优先触发的 , 开发者可以做一些敏感权限拦截 。
@Override
public boolean intercept(String url, String[] permissions, String action) {
Log.i(TAG, "url:" + url + " permission:" + permissions + " action:" + action);
return false;
}
};
```

* #### AgentWeb 所需要的权限
```
Expand Down Expand Up @@ -247,13 +261,10 @@ Java 注入类不要混淆 , 例如 sample 里面的 AndroidInterface 类 ,
* v_1.2.0 全面支持全屏视频 。
* v_1.1.2 完善功能 。

## 下个版本功能预告

* 支持动态权限申请
* 废弃 `uploadFileResult` 方法 (走 `ActionActivity` 绕过该方法)
* 加入权限控制
* `FileChooser` 加入了拍照选择

## 下个版本预告
* 加入默认的错误页
* 支持自定义错误页

## 致谢
* [SafeWebView](https://github.com/seven456/SafeWebView)
Expand Down
4 changes: 2 additions & 2 deletions README_ENGLISH.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ Support | Simplicity | Support | Concise | Yes | Security | Support |
* Gradle

```
compile 'com.just.agentweb:agentweb:1.2.6'
compile 'com.just.agentweb:agentweb:2.0.0'
```
* Maven

```
<dependency>
<groupId>com.just.agentweb</groupId>
<artifactId>agentweb</artifactId>
<version>1.2.6</version>
<version>2.0.0</version>
<type>pom</type>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ publish {
userOrg = 'just'
groupId = 'com.just.agentweb'
artifactId = 'agentweb'
version = '1.2.6'
version = '2.0.0'
description = 'very easy to build you web page'
website = "https://github.com/Justson/AgentWeb"
}
2 changes: 1 addition & 1 deletion library/src/main/java/com/just/library/AgentWebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AgentWebConfig {
static final String AGENTWEB_CACHE_PATCH = File.separator + "agentweb-cache";
static final String FILE_CACHE_PATH = "agentweb-cache";
static String AGENTWEB_FILE_PATH;
public static boolean DEBUG = true;
public static boolean DEBUG = false;
static final boolean isKikatOrBelowKikat = Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT;
public static final int WEBVIEW_DEFAULT_TYPE = 1;
public static final int WEBVIEW_AGENTWEB_SAFE_TYPE = 2;
Expand Down

0 comments on commit 96d23c2

Please sign in to comment.