Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Commit

Permalink
v1.113
Browse files Browse the repository at this point in the history
  • Loading branch information
raulhaag committed Nov 8, 2019
1 parent 9bdde0e commit 9a786a6
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ Downloads

Changelog
---------
Cambios en v1.113:
* Fix tmo
* Fix la búsqueda en mangaeden, mangapanda, readmangatoday y taad para dispositivos para un api vieja.

Changes in v1.113:
* Fix tmo
* Fix mangaeden, mangapanda, readmangatoday and taad search on low api devices.
Cambios en v1.112:
* Fix TMO.

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "ar.rulosoft.mimanganu"
versionCode 112
versionName "1.112"
versionCode 113
versionName "1.113"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion 15
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package ar.rulosoft.mimanganu.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.text.format.DateFormat;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;

// taken from https://stackoverflow.com/questions/601503/how-do-i-obtain-crash-data-from-my-android-application
// rrainn / Prags
// only minimal changes


public class CustomExceptionHandler implements Thread.UncaughtExceptionHandler {

private Thread.UncaughtExceptionHandler defaultUEH;

private String localPath;
private Context ctx;


/*
* if any of the parameters is null, the respective functionality
* will not be used
*/
public CustomExceptionHandler(String localPath) {
this.localPath = localPath;
this.defaultUEH = Thread.getDefaultUncaughtExceptionHandler();
}

public static void Attach(Context ctx) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
String dir = prefs.getString("directorio", Environment.getExternalStorageDirectory().getAbsolutePath()) + "/MiMangaNu/logs/";
if (!new File(dir).exists()) {
new File(dir).mkdir();
}
if (!(Thread.getDefaultUncaughtExceptionHandler() instanceof CustomExceptionHandler)) {
Thread.setDefaultUncaughtExceptionHandler(new CustomExceptionHandler(dir));
}
}

public void uncaughtException(Thread t, Throwable e) {
String timestamp = (DateFormat.format("dd-MM-yyyy--hh-mm-ss", new java.util.Date()).toString());
final Writer result = new StringWriter();
final PrintWriter printWriter = new PrintWriter(result);
e.printStackTrace(printWriter);
String stacktrace = result.toString();
printWriter.close();
String filename = timestamp + ".txt";

if (localPath != null) {
writeToFile(stacktrace, filename);
}
defaultUEH.uncaughtException(t, e);
}

private void writeToFile(String stacktrace, String filename) {
try {
BufferedWriter bos = new BufferedWriter(new FileWriter(
localPath + "/" + filename));
bos.write(stacktrace);
bos.flush();
bos.close();
} catch (Exception e) {
e.printStackTrace();
}
}


}
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="update_message">Cambios en v1.112:\n\t*Fix TMO.</string>
<string name="update_message">Cambios en v1.113:\n\t* Fix tmo\n\t* Fix la búsqueda en mangaeden, mangapanda, readmangatoday y taad para dispositivos para un api vieja.</string>
<string name="action_ajustar_a">Ajustar a</string>
<string name="descargas">Descargas</string>
<string name="datosde">Datos de </string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="update_message">Changes in v1.112:\n\t*Fix TMO.</string>
<string name="update_message">Changes in v1.113:\n\t* fix tmo\n\t* fix mangaeden, mangapanda, readmangatoday and taad search on low api devices.</string>
<string name="_12hours">12 Hours</string>
<string name="_1day">1 day</string>
<string name="_2day">2 days</string>
Expand Down

0 comments on commit 9a786a6

Please sign in to comment.