Skip to content

Commit

Permalink
1.upgrade to v4.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Justson committed Apr 26, 2021
1 parent a3084d5 commit 7246fae
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 27 deletions.
6 changes: 3 additions & 3 deletions README-ENGLISH.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ AgentWeb Sample shows AgentWeb library powerful features, detailed link, please
* Gradle

```
api 'com.just.agentweb:agentweb:4.1.5' // (Required)
api 'com.just.agentweb:filechooser:4.1.5'// (optional)
api 'com.download.library:Downloader:4.1.5'// (optional)
api 'com.just.agentweb:agentweb:4.1.9' // (Required)
api 'com.just.agentweb:filechooser:4.1.9'// (optional)
api 'com.download.library:Downloader:4.1.9'// (optional)
```


Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ AgentWeb 是一个基于的 Android WebView ,极度容易使用以及功能强
* Gradle

```
implementation 'com.github.Justson.AgentWeb:agentweb:v4.1.8' // (必选)
implementation 'com.github.Justson.AgentWeb:filechooser:v4.1.8' // (可选)
implementation 'com.github.Justson:Downloader:v4.1.8' // (可选)
implementation 'com.github.Justson.AgentWeb:agentweb:v4.1.9' // (必选)
implementation 'com.github.Justson.AgentWeb:filechooser:v4.1.9' // (可选)
implementation 'com.github.Justson:Downloader:v4.1.9' // (可选)
```

* androidx

```
implementation 'com.just.agentweb:agentweb-androidx:4.1.5' // (必选)
implementation 'com.just.agentweb:filechooser-androidx:4.1.5'// (可选)
implementation 'com.download.library:downloader-androidx:4.1.5'// (可选)
implementation 'com.just.agentweb:agentweb-androidx:4.1.9' // (必选)
implementation 'com.just.agentweb:filechooser-androidx:4.1.9'// (可选)
implementation 'com.download.library:downloader-androidx:4.1.9'// (可选)
```


Expand Down
4 changes: 2 additions & 2 deletions agentweb-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 14
targetSdkVersion TARGET_SDK_VERSION.toInteger()
versionCode 2
versionName "4.1.5"
versionName "4.1.9"

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

Expand Down Expand Up @@ -36,7 +36,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compileOnly 'com.github.Justson:Downloader:v4.1.8'
compileOnly 'com.github.Justson:Downloader:v4.1.9'
compileOnly "com.android.support:design:${SUPPORT_LIB_VERSION}"
compileOnly "com.android.support:support-v4:${SUPPORT_LIB_VERSION}"
compileOnly fileTree(include: ['*.jar'], dir: 'providedLibs')
Expand Down
2 changes: 1 addition & 1 deletion agentweb-filechooser/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 14
targetSdkVersion TARGET_SDK_VERSION.toInteger()
versionCode 2
versionName "4.1.5"
versionName "4.1.9"

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

Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 19
targetSdkVersion TARGET_SDK_VERSION.toInteger()
versionCode 4
versionName "4.1.5"
versionName "4.1.9"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
Expand Down Expand Up @@ -58,7 +58,7 @@ dependencies {
testCompile 'junit:junit:4.12'
compile project(':agentweb-core')
api project(':agentweb-filechooser')
implementation 'com.github.Justson:Downloader:v4.1.8'
implementation 'com.github.Justson:Downloader:v4.1.9'
// implementation 'com.github.Justson.AgentWeb:agentweb:v4.1.8'
// implementation 'com.github.Justson.AgentWeb:filechooser:v4.1.8'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@
import java.util.ArrayList;
import java.util.Locale;

//import com.download.library.DownloadException;
//import com.download.library.DownloadImpl;
//import com.download.library.DownloadListenerAdapter;
//import com.download.library.DownloadTask;
//import com.download.library.Downloader;
//import com.download.library.Extra;
//import com.download.library.Runtime;

/**
* @author ringle-android
Expand Down Expand Up @@ -82,7 +75,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
/*new Thread(new Runnable() {
@Override
public void run() {
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() {
File file = DownloadImpl.getInstance().with(getApplicationContext()).url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk").setDownloadingListener(new DownloadListenerAdapter() {
@Override
public void onProgress(String url, long downloaded, long length, long usedTime) {
super.onProgress(url, downloaded, length, usedTime);
Expand All @@ -99,7 +92,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
Log.i(TAG, " download success:" + ((File) file).length());
}
}).start();*/
/*DownloadImpl.getInstance(NativeDownloadActivity.this)
/*DownloadImpl.getInstance()
.with(getApplicationContext())
.setEnableIndicator(true)
.url("http://shouji.360tpcdn.com/170918/f7aa8587561e4031553316ada312ab38/com.tencent.qqlive_13049.apk")
Expand All @@ -123,7 +116,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
} catch (IOException e) {
e.printStackTrace();
}
DownloadImpl.getInstance(NativeDownloadActivity.this)
DownloadImpl.getInstance()
.with(getApplicationContext())
.target(file)
.url("http://shouji.360tpcdn.com/170918/93d1695d87df5a0c0002058afc0361f1/com.ss.android.article.news_636.apk")
Expand All @@ -142,7 +135,7 @@ public boolean onResult(Throwable throwable, Uri path, String url, Extra extra)
});*/


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

0 comments on commit 7246fae

Please sign in to comment.