Commit 05aac0e1 authored by Jamin Collins's avatar Jamin Collins

update mobile for Sentry

Signed-off-by: Jamin Collins's avatarJamin W. Collins <jamin.collins@gmail.com>
parent 881bd7ad
......@@ -283,6 +283,7 @@
<fileset dir="${basedir}/../forge-gui/release-files/" includes="ISSUES.txt" />
<fileset dir="${basedir}/../forge-gui/release-files/" includes="CHANGES.txt" />
<fileset dir="${basedir}/../forge-gui/" includes="MANUAL.txt" />
<fileset dir="${basedir}/../forge-gui-mobile-dev/" includes="sentry.properties" />
<fileset dir="${basedir}/../forge-gui/">
<include name="res/**" />
<exclude name="res/cardsfolder/**" />
......
......@@ -25,13 +25,15 @@
-dontwarn java.awt.**
-dontwarn java.util.**
-dontwarn java.lang.**
-dontwarn org.slf4j.**
-dontwarn javax.**
-keep class forge.** { *; }
-keep class com.thoughtworks.xstream.** { *; }
-keep class org.apache.commons.lang3.** { *; }
-keep class com.google.guava.** { *; }
-keep class com.google.common.** { *; }
-keep class io.sentry.event.Event { *; }
-keepclassmembers class com.badlogic.gdx.backends.android.AndroidInput* {
<init>(com.badlogic.gdx.Application, android.content.Context, java.lang.Object, com.badlogic.gdx.backends.android.AndroidApplicationConfiguration);
......@@ -81,3 +83,8 @@
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepattributes LineNumberTable,SourceFile
# https://stackoverflow.com/a/32615580
-optimizations !class/unboxing/enum
\ No newline at end of file
# ideally this should be using HTTPS, but this is fine for now
dsn=http://a0b8dbad9b8a49cfa51bf65d462e8dae@sentry.cardforge.org:9000/2
stacktrace.app.packages=forge
# where to store events if offline or can't reach the above server
buffer.dir=sentry-events
buffer.size=100
# allow ample time for graceful shutdown
buffer.shutdowntimeout=5000
async.shutdowntimeout=5000
# allow longer messages
maxmessagelength=1500
\ No newline at end of file
......@@ -29,11 +29,11 @@ public class BugReportDialog extends FScreen { //use screen rather than dialog s
Forge.openScreen(new BugReportDialog(title, text, showExitAppBtn));
}
private final FTextArea lblHeader = add(new FTextArea(false, BugReporter.HELP_TEXT));
private final FTextArea lblHeader = add(new FTextArea(false, "Report Bug"));
private final TemplateView tvDetails;
private final FButton btnReport = add(new FButton(BugReporter.REPORT));
private final FButton btnSave = add(new FButton(BugReporter.SAVE));
private final FButton btnContinue = add(new FButton(BugReporter.CONTINUE));
private final FButton btnDiscard = add(new FButton(BugReporter.DISCARD));
private final FButton btnExit = add(new FButton(BugReporter.EXIT));
private BugReportDialog(String title, String text0, boolean showExitAppBtn) {
......@@ -43,7 +43,8 @@ public class BugReportDialog extends FScreen { //use screen rather than dialog s
btnReport.setCommand(new FEventHandler() {
@Override
public void handleEvent(FEvent e) {
BugReporter.copyAndGoToForums(tvDetails.text);
BugReporter.sendSentry();
Forge.back();
}
});
btnSave.setCommand(new FEventHandler() {
......@@ -52,7 +53,7 @@ public class BugReportDialog extends FScreen { //use screen rather than dialog s
BugReporter.saveToFile(tvDetails.text);
}
});
btnContinue.setCommand(new FEventHandler() {
btnDiscard.setCommand(new FEventHandler() {
@Override
public void handleEvent(FEvent e) {
Forge.back();
......@@ -115,11 +116,11 @@ public class BugReportDialog extends FScreen { //use screen rather than dialog s
y += buttonHeight + PADDING;
}
if (btnExit.isVisible()) {
btnContinue.setBounds(x, y, buttonWidth, buttonHeight);
btnDiscard.setBounds(x, y, buttonWidth, buttonHeight);
btnExit.setBounds(x + buttonWidth + PADDING, y, buttonWidth, buttonHeight);
}
else {
btnContinue.setBounds(x, y, 2 * buttonWidth + PADDING, buttonHeight);
btnDiscard.setBounds(x, y, 2 * buttonWidth + PADDING, buttonHeight);
}
}
......
......@@ -78,6 +78,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
"Minimize on Screen Lock",
"Minimize Forge when screen is locked (enable if you experience graphic glitches after locking your screen)."),
0);
lstSettings.addItem(new BooleanSetting(FPref.USE_SENTRY,
"Automatic Bug Reports",
"Automatically send bug reports to the developers, without prompting."),
0);
//Gameplay Options
lstSettings.addItem(new CustomSelectSetting(FPref.UI_CURRENT_AI_PROFILE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment