Skip to content

Commit 7246fae

Browse files
committed
1.upgrade to v4.1.9
1 parent a3084d5 commit 7246fae

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed

README-ENGLISH.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ AgentWeb Sample shows AgentWeb library powerful features, detailed link, please
2020
* Gradle
2121

2222
```
23-
api 'com.just.agentweb:agentweb:4.1.5' // (Required)
24-
api 'com.just.agentweb:filechooser:4.1.5'// (optional)
25-
api 'com.download.library:Downloader:4.1.5'// (optional)
23+
api 'com.just.agentweb:agentweb:4.1.9' // (Required)
24+
api 'com.just.agentweb:filechooser:4.1.9'// (optional)
25+
api 'com.download.library:Downloader:4.1.9'// (optional)
2626
```
2727

2828

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ AgentWeb 是一个基于的 Android WebView ,极度容易使用以及功能强
1717
* Gradle
1818

1919
```
20-
implementation 'com.github.Justson.AgentWeb:agentweb:v4.1.8' // (必选)
21-
implementation 'com.github.Justson.AgentWeb:filechooser:v4.1.8' // (可选)
22-
implementation 'com.github.Justson:Downloader:v4.1.8' // (可选)
20+
implementation 'com.github.Justson.AgentWeb:agentweb:v4.1.9' // (必选)
21+
implementation 'com.github.Justson.AgentWeb:filechooser:v4.1.9' // (可选)
22+
implementation 'com.github.Justson:Downloader:v4.1.9' // (可选)
2323
```
2424

2525
* androidx
2626

2727
```
28-
implementation 'com.just.agentweb:agentweb-androidx:4.1.5' // (必选)
29-
implementation 'com.just.agentweb:filechooser-androidx:4.1.5'// (可选)
30-
implementation 'com.download.library:downloader-androidx:4.1.5'// (可选)
28+
implementation 'com.just.agentweb:agentweb-androidx:4.1.9' // (必选)
29+
implementation 'com.just.agentweb:filechooser-androidx:4.1.9'// (可选)
30+
implementation 'com.download.library:downloader-androidx:4.1.9'// (可选)
3131
```
3232

3333

agentweb-core/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion 14
99
targetSdkVersion TARGET_SDK_VERSION.toInteger()
1010
versionCode 2
11-
versionName "4.1.5"
11+
versionName "4.1.9"
1212

1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414

@@ -36,7 +36,7 @@ dependencies {
3636
exclude group: 'com.android.support', module: 'support-annotations'
3737
})
3838
testCompile 'junit:junit:4.12'
39-
compileOnly 'com.github.Justson:Downloader:v4.1.8'
39+
compileOnly 'com.github.Justson:Downloader:v4.1.9'
4040
compileOnly "com.android.support:design:${SUPPORT_LIB_VERSION}"
4141
compileOnly "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
4242
compileOnly fileTree(include: ['*.jar'], dir: 'providedLibs')

agentweb-filechooser/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion 14
99
targetSdkVersion TARGET_SDK_VERSION.toInteger()
1010
versionCode 2
11-
versionName "4.1.5"
11+
versionName "4.1.9"
1212

1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414

sample/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion 19
99
targetSdkVersion TARGET_SDK_VERSION.toInteger()
1010
versionCode 4
11-
versionName "4.1.5"
11+
versionName "4.1.9"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
signingConfigs {
@@ -58,7 +58,7 @@ dependencies {
5858
testCompile 'junit:junit:4.12'
5959
compile project(':agentweb-core')
6060
api project(':agentweb-filechooser')
61-
implementation 'com.github.Justson:Downloader:v4.1.8'
61+
implementation 'com.github.Justson:Downloader:v4.1.9'
6262
// implementation 'com.github.Justson.AgentWeb:agentweb:v4.1.8'
6363
// implementation 'com.github.Justson.AgentWeb:filechooser:v4.1.8'
6464
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'

sample/src/main/java/com/just/agentweb/sample/activity/NativeDownloadActivity.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@
4444
import java.util.ArrayList;
4545
import java.util.Locale;
4646

47-
//import com.download.library.DownloadException;
48-
//import com.download.library.DownloadImpl;
49-
//import com.download.library.DownloadListenerAdapter;
50-
//import com.download.library.DownloadTask;
51-
//import com.download.library.Downloader;
52-
//import com.download.library.Extra;
53-
//import com.download.library.Runtime;
5447

5548
/**
5649
* @author ringle-android
@@ -82,7 +75,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8275
/*new Thread(new Runnable() {
8376
@Override
8477
public void run() {
85-
File file = DownloadImpl.getInstance(NativeDownloadActivity.this).with(getApplicationContext()).url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk").setDownloadingListener(new DownloadListenerAdapter() {
78+
File file = DownloadImpl.getInstance().with(getApplicationContext()).url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk").setDownloadingListener(new DownloadListenerAdapter() {
8679
@Override
8780
public void onProgress(String url, long downloaded, long length, long usedTime) {
8881
super.onProgress(url, downloaded, length, usedTime);
@@ -99,7 +92,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
9992
Log.i(TAG, " download success:" + ((File) file).length());
10093
}
10194
}).start();*/
102-
/*DownloadImpl.getInstance(NativeDownloadActivity.this)
95+
/*DownloadImpl.getInstance()
10396
.with(getApplicationContext())
10497
.setEnableIndicator(true)
10598
.url("http://shouji.360tpcdn.com/170918/f7aa8587561e4031553316ada312ab38/com.tencent.qqlive_13049.apk")
@@ -123,7 +116,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
123116
} catch (IOException e) {
124117
e.printStackTrace();
125118
}
126-
DownloadImpl.getInstance(NativeDownloadActivity.this)
119+
DownloadImpl.getInstance()
127120
.with(getApplicationContext())
128121
.target(file)
129122
.url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk")
@@ -142,7 +135,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
142135
});*/
143136

144137

145-
// DownloadImpl.getInstance(NativeDownloadActivity.this)
138+
// DownloadImpl.getInstance()
146139
// .with(getApplicationContext())
147140
// .target(getExternalFilesDir(android.os.Environment.DIRECTORY_PICTURES))
148141
// .url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk")
@@ -159,7 +152,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
159152
// return super.onResult(throwable, path, url, extra);
160153
// }
161154
// });
162-
/* DownloadImpl.getInstance(NativeDownloadActivity.this)
155+
/* DownloadImpl.getInstance()
163156
.with(getApplicationContext())
164157
.target(new File(Runtime.getInstance().getDir(this, true).getAbsolutePath() + "/" + "com.ss.android.article.news_636.apk"), this.getPackageName() + ".DownloadFileProvider")//自定义路径需指定目录和authority(FileContentProvide),需要相对应匹配才能启动通知,和自动打开文件
165158
.setUniquePath(false)//是否唯一路径
@@ -343,7 +336,7 @@ public boolean onResult(Throwable throwable, Uri uri, String url, Extra extra) {
343336
nativeDownloadViewHolder.mStatusButton.setText("出错");
344337
nativeDownloadViewHolder.mStatusButton.setEnabled(false);
345338
}
346-
Toast.makeText(NativeDownloadActivity.this, downloadException.getMsg(), 1).show();
339+
Toast.makeText(NativeDownloadActivity.this, downloadException.getMsg(), Toast.LENGTH_SHORT).show();
347340
}
348341
return super.onResult(throwable, uri, url, extra);
349342
}

0 commit comments

Comments
 (0)