diff --git a/app/src/main/java/de/danoeh/antennapod/activity/BugReportActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/BugReportActivity.java
index 01413bb79..48264bb26 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/BugReportActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/BugReportActivity.java
@@ -52,5 +52,19 @@ public class BugReportActivity extends AppCompatActivity {
clipboard.setPrimaryClip(clip);
Snackbar.make(findViewById(android.R.id.content), R.string.copied_to_clipboard, Snackbar.LENGTH_SHORT).show();
});
+
+ findViewById(R.id.btn_export_logcat).setOnClickListener(v -> {
+ try {
+ File filename = new File(UserPreferences.getDataFolder(null), "full-logs.txt");
+ filename.createNewFile();
+ String cmd = "logcat -d -f " + filename.getAbsolutePath();
+ Runtime.getRuntime().exec(cmd);
+ Snackbar.make(findViewById(android.R.id.content),
+ filename.getAbsolutePath(), Snackbar.LENGTH_SHORT).show();
+ } catch (IOException e) {
+ e.printStackTrace();
+ Snackbar.make(findViewById(android.R.id.content), e.getMessage(), Snackbar.LENGTH_LONG).show();
+ }
+ });
}
}
diff --git a/app/src/main/res/layout/bug_report.xml b/app/src/main/res/layout/bug_report.xml
index e97e85265..1cc9bc9d8 100644
--- a/app/src/main/res/layout/bug_report.xml
+++ b/app/src/main/res/layout/bug_report.xml
@@ -16,6 +16,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
+
+
Visit user forum
Report bug
Open bug tracker
+ Export logs
Copy to clipboard
Copied to clipboard
Experimental