diff --git a/app/build.gradle b/app/build.gradle
index 2981b8a..f195437 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -8,8 +8,8 @@ android {
applicationId "javinator9889.bitcoinpools"
minSdkVersion 21
targetSdkVersion 27
- versionCode 70
- versionName "1.18.3"
+ versionCode 71
+ versionName "1.18.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
diff --git a/app/release/BitCoinPools-1.18.4.apk b/app/release/BitCoinPools-1.18.4.apk
new file mode 100644
index 0000000..92b629d
Binary files /dev/null and b/app/release/BitCoinPools-1.18.4.apk differ
diff --git a/app/release/output.json b/app/release/output.json
index 91fe902..4952b83 100644
--- a/app/release/output.json
+++ b/app/release/output.json
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":70,"versionName":"1.18.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":71,"versionName":"1.18.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/src/main/java/javinator9889/bitcoinpools/DataLoaderScreen.java b/app/src/main/java/javinator9889/bitcoinpools/DataLoaderScreen.java
index 603bc18..266174a 100644
--- a/app/src/main/java/javinator9889/bitcoinpools/DataLoaderScreen.java
+++ b/app/src/main/java/javinator9889/bitcoinpools/DataLoaderScreen.java
@@ -51,20 +51,38 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
Log.d(Constants.LOG.MATAG, Constants.LOG.CREATING_MAINVIEW);
new DataLoader().execute();
} else {
- new MaterialDialog.Builder(this)
- .title(R.string.noConnectionTitle)
- .content(R.string.noConnectionDesc)
- .cancelable(false)
- .positiveText(R.string.accept)
- .onPositive(new MaterialDialog.SingleButtonCallback() {
- @Override
- public void onClick(@NonNull MaterialDialog dialog,
- @NonNull DialogAction which) {
- onBackPressed();
- }
- })
- .build()
- .show();
+ try {
+ new MaterialDialog.Builder(this)
+ .title(R.string.noConnectionTitle)
+ .content(R.string.noConnectionDesc)
+ .cancelable(false)
+ .positiveText(R.string.accept)
+ .onPositive(new MaterialDialog.SingleButtonCallback() {
+ @Override
+ public void onClick(@NonNull MaterialDialog dialog,
+ @NonNull DialogAction which) {
+ onBackPressed();
+ }
+ })
+ .build()
+ .show();
+ } catch (Exception e) {
+ // MaterialDialog lib doesn't provide functionality to catch its own exception
+ // "DialogException" so we need to catch a global generally exception and cancel
+ // app execution. This happens because the application is trying to show a dialog
+ // after the app has been closed (there is no activity).
+ Log.e("MaterialDialog", "Not possible to show dialog - maybe the app is" +
+ " closed. Full trace: " + e.getMessage());
+ try {
+ this.finish();
+ } catch (Exception activityFinishException) {
+ // Maybe closing the activity when execution failed throws an exception if
+ // there is no possibility to close it
+ Log.e("FinishException", "Impossible to finish the activity. Maybe " +
+ "it is finished yet. More info: "
+ + activityFinishException.getMessage());
+ }
+ }
}
}
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index d5db920..1e1d4c2 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -74,6 +74,8 @@
GitHub]]>
Versión 1.18.4 (09/06/18)
+ - Correcciones menores de bugs y fallos
Versión 1.18.3 (28/04/18)
- Corregidos errores menores en la aplicación
- Reducido el tamaño de la aplicación
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6af4292..dbf6aed 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -97,6 +97,8 @@ SOFTWARE.
GitHub]]>
Version 1.18.4 (09/06/18)
+ - Minor bugs and issues corrections
Version 1.18.3 (28/04/18)
- Solved little errors in the app
- App size reduced