From 69704858598289d273ca5641c9bad5367225da59 Mon Sep 17 00:00:00 2001 From: Sanoj Date: Wed, 3 Jun 2020 11:51:18 +0530 Subject: [PATCH] Update data set url --- .../java/com/mobilegenomics/genopo/activity/DemoActivity.java | 4 +--- .../com/mobilegenomics/genopo/activity/DownloadActivity.java | 4 +--- .../com/mobilegenomics/genopo/support/DownloadManager.java | 2 +- app/src/main/res/values/strings.xml | 3 +++ 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/mobilegenomics/genopo/activity/DemoActivity.java b/app/src/main/java/com/mobilegenomics/genopo/activity/DemoActivity.java index 40c15f2b..4e9ba2aa 100644 --- a/app/src/main/java/com/mobilegenomics/genopo/activity/DemoActivity.java +++ b/app/src/main/java/com/mobilegenomics/genopo/activity/DemoActivity.java @@ -41,8 +41,6 @@ public class DemoActivity extends AppCompatActivity { private static final String TAG = DemoActivity.class.getSimpleName(); - private static final String ecoliDataSetURL = "https://zanojmobiapps.com/_tmp/genome/ecoli/ecoli-data-set.zip"; - private static final String folderName = "mobile-genomics"; private static final String fileName = "ecoli-data-set.zip"; @@ -132,7 +130,7 @@ public void onClick(final View v) { String datasetFolder = Environment.getExternalStorageDirectory() + "/" + folderName + "/ecoli-data-set"; FileUtil.deleteFolder(new File(datasetFolder)); - downloadDataSet(ecoliDataSetURL); + downloadDataSet(getResources().getString(R.string.ecoli_data_set_url)); } }); linearLayout.addView(btnDownloadAndExtract); diff --git a/app/src/main/java/com/mobilegenomics/genopo/activity/DownloadActivity.java b/app/src/main/java/com/mobilegenomics/genopo/activity/DownloadActivity.java index bc6e85c0..09c50b3b 100644 --- a/app/src/main/java/com/mobilegenomics/genopo/activity/DownloadActivity.java +++ b/app/src/main/java/com/mobilegenomics/genopo/activity/DownloadActivity.java @@ -37,8 +37,6 @@ public class DownloadActivity extends AppCompatActivity { private static String folderPath; - private static final String ecoliDataSetURL = "https://zanojmobiapps.com/_tmp/genome/ecoli/ecoli-data-set.zip"; - Button btnDownload; Button btnDownloadEcoli; @@ -130,7 +128,7 @@ public void onClick(final View v) { btnDownloadEcoli.setOnClickListener(new OnClickListener() { @Override public void onClick(final View v) { - downloadDataSet(ecoliDataSetURL); + downloadDataSet(getResources().getString(R.string.ecoli_data_set_url)); } }); diff --git a/app/src/main/java/com/mobilegenomics/genopo/support/DownloadManager.java b/app/src/main/java/com/mobilegenomics/genopo/support/DownloadManager.java index 01c20987..59466840 100644 --- a/app/src/main/java/com/mobilegenomics/genopo/support/DownloadManager.java +++ b/app/src/main/java/com/mobilegenomics/genopo/support/DownloadManager.java @@ -115,7 +115,7 @@ public void taskEnd(@NonNull final DownloadTask task, @NonNull final EndCause ca final String statusWithSpeed = cause.toString() + " " + taskSpeed.averageSpeed(); statusTextView.setText(statusWithSpeed); if (realCause != null) { - Log.e(TAG, "Download Error : " + realCause); + statusTextView.setText("Download Error : " + realCause.getMessage()); } downloadListener.onComplete(cause, realCause); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 43d0a55e..a4d9d19a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -105,4 +105,7 @@ Run a Single Tool\n(Artic_C, Bcftools, Bioawk) To run an individual analysis tool, select a pipeline that has the particular tool. GUI Mode is provided only for a limited number of sub-tools. Use Terminal Mode to run any sub-tool of an analysis tool + + https://mobile-genomics.github.io/genopo/data/ecoli-data-set.zip +