|
|
@ -46,14 +46,14 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> { |
|
|
|
private static final String DOWNLOAD_URL = |
|
|
|
private static final String DOWNLOAD_URL = |
|
|
|
//"http://kotlinlang.org/docs/kotlin-docs.pdf";
|
|
|
|
//"http://kotlinlang.org/docs/kotlin-docs.pdf";
|
|
|
|
//"https://atom-installer.github.com/v1.13.0/AtomSetup.exe?s=1484074138&ext=.exe";
|
|
|
|
//"https://atom-installer.github.com/v1.13.0/AtomSetup.exe?s=1484074138&ext=.exe";
|
|
|
|
//"http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk";
|
|
|
|
"http://static.gaoshouyou.com/d/22/94/822260b849944492caadd2983f9bb624.apk"; |
|
|
|
//"http://sitcac.daxincf.cn/wp-content/uploads/swift_vido/01/element.mp4_1";
|
|
|
|
//"http://sitcac.daxincf.cn/wp-content/uploads/swift_vido/01/element.mp4_1";
|
|
|
|
//"http://120.25.196.56:8000/filereq?id=15692406294&ipncid=105635&client=android&filename=20170819185541.avi";
|
|
|
|
//"http://120.25.196.56:8000/filereq?id=15692406294&ipncid=105635&client=android&filename=20170819185541.avi";
|
|
|
|
//"http://down2.xiaoshuofuwuqi.com/d/file/filetxt/20170608/14/%BA%DA%CE%D7%CA%A6%E1%C8%C6%F0.txt";
|
|
|
|
//"http://down2.xiaoshuofuwuqi.com/d/file/filetxt/20170608/14/%BA%DA%CE%D7%CA%A6%E1%C8%C6%F0.txt";
|
|
|
|
//"http://tinghuaapp.oss-cn-shanghai.aliyuncs.com/20170612201739607815";
|
|
|
|
//"http://tinghuaapp.oss-cn-shanghai.aliyuncs.com/20170612201739607815";
|
|
|
|
//"http://static.gaoshouyou.com/d/36/69/2d3699acfa69e9632262442c46516ad8.apk";
|
|
|
|
//"http://static.gaoshouyou.com/d/36/69/2d3699acfa69e9632262442c46516ad8.apk";
|
|
|
|
//"http://oqcpqqvuf.bkt.clouddn.com/ceshi.txt";
|
|
|
|
//"http://oqcpqqvuf.bkt.clouddn.com/ceshi.txt";
|
|
|
|
"http://down8.androidgame-store.com/201706122321/97967927DD4E53D9905ECAA7874C8128/new/game1/19/45319/com.neuralprisma-2.5.2.174-2000174_1494784835.apk?f=web_1"; |
|
|
|
//"http://down8.androidgame-store.com/201706122321/97967927DD4E53D9905ECAA7874C8128/new/game1/19/45319/com.neuralprisma-2.5.2.174-2000174_1494784835.apk?f=web_1";
|
|
|
|
//不支持断点的链接
|
|
|
|
//不支持断点的链接
|
|
|
|
//"http://ox.konsung.net:5555/ksdc-web/download/downloadFile/?fileName=ksdc_1.0.2.apk&rRange=0-";
|
|
|
|
//"http://ox.konsung.net:5555/ksdc-web/download/downloadFile/?fileName=ksdc_1.0.2.apk&rRange=0-";
|
|
|
|
//"http://172.18.104.50:8080/download/_302turn";
|
|
|
|
//"http://172.18.104.50:8080/download/_302turn";
|
|
|
@ -72,8 +72,8 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> { |
|
|
|
* 设置start 和 stop 按钮状态 |
|
|
|
* 设置start 和 stop 按钮状态 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void setBtState(boolean state) { |
|
|
|
private void setBtState(boolean state) { |
|
|
|
mStart.setEnabled(state); |
|
|
|
//mStart.setEnabled(state);
|
|
|
|
mStop.setEnabled(!state); |
|
|
|
//mStop.setEnabled(!state);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override public boolean onCreateOptionsMenu(Menu menu) { |
|
|
|
@Override public boolean onCreateOptionsMenu(Menu menu) { |
|
|
@ -195,11 +195,23 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> { |
|
|
|
public void onClick(View view) { |
|
|
|
public void onClick(View view) { |
|
|
|
switch (view.getId()) { |
|
|
|
switch (view.getId()) { |
|
|
|
case R.id.start: |
|
|
|
case R.id.start: |
|
|
|
Aria.download(SingleTaskActivity.this) |
|
|
|
startD(); |
|
|
|
.load(DOWNLOAD_URL, true) |
|
|
|
startD(); |
|
|
|
.addHeader("groupName", "value") |
|
|
|
startD(); |
|
|
|
.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/hhhhhhhh.apk") |
|
|
|
startD(); |
|
|
|
.start(); |
|
|
|
startD(); |
|
|
|
|
|
|
|
startD(); |
|
|
|
|
|
|
|
//new Thread(new Runnable() {
|
|
|
|
|
|
|
|
// @Override public void run() {
|
|
|
|
|
|
|
|
// startD();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}).start();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//new Thread(new Runnable() {
|
|
|
|
|
|
|
|
// @Override public void run() {
|
|
|
|
|
|
|
|
// startD();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//}).start();
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case R.id.stop: |
|
|
|
case R.id.stop: |
|
|
|
Aria.download(this).load(DOWNLOAD_URL).stop(); |
|
|
|
Aria.download(this).load(DOWNLOAD_URL).stop(); |
|
|
@ -209,4 +221,12 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void startD(){ |
|
|
|
|
|
|
|
Aria.download(SingleTaskActivity.this) |
|
|
|
|
|
|
|
.load(DOWNLOAD_URL, true) |
|
|
|
|
|
|
|
.addHeader("groupName", "value") |
|
|
|
|
|
|
|
.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/hhhhhhhh.apk") |
|
|
|
|
|
|
|
.start(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |