integrate ACRA for sending crash reports

This commit is contained in:
Andrew Dolgov 2015-02-09 19:58:11 +03:00
parent 10c9fb0456
commit 7788c3d0ea
7 changed files with 30 additions and 7 deletions

View File

@ -33,4 +33,5 @@ dependencies {
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.shamanland:fab:0.0.5'
compile 'ch.acra:acra:4.5.0'
}

View File

@ -90,6 +90,7 @@
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="acra-4.5.0" level="project" />
<orderEntry type="library" exported="" name="universal-image-loader-1.9.3" level="project" />
<orderEntry type="library" exported="" name="dashclock-api-r1.1" level="project" />
<orderEntry type="library" exported="" name="fab-0.0.5" level="project" />

View File

@ -250,6 +250,13 @@
android:name=".ArticleImagesPagerActivity"
android:label="Article Images" >
</activity>
<activity android:name="org.acra.CrashReportDialog"
android:theme="@style/DarkDialogTheme"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
</application>
</manifest>

View File

@ -1,15 +1,20 @@
package org.fox.ttrss;
import java.util.ArrayList;
import org.fox.ttrss.types.Article;
import org.fox.ttrss.types.ArticleList;
import org.fox.ttrss.types.Feed;
import android.app.Application;
import android.os.Bundle;
import android.os.Parcelable;
import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;
import org.fox.ttrss.types.Article;
import org.fox.ttrss.types.ArticleList;
import org.fox.ttrss.types.Feed;
import java.util.ArrayList;
@ReportsCrashes(formKey = "", mode = ReportingInteractionMode.DIALOG,
resDialogText = R.string.crash_dialog_text,
formUri = "http://tt-rss.org/acra/submit/")
public class GlobalState extends Application {
private static GlobalState m_singleton;
@ -28,6 +33,8 @@ public class GlobalState extends Application {
@Override
public final void onCreate() {
super.onCreate();
ACRA.init(this);
m_singleton = this;
}

View File

@ -2,5 +2,5 @@
<style name="DarkDialogTheme" parent="android:Theme.Holo.Dialog">
</style>
</resources>

View File

@ -264,4 +264,6 @@
<string name="headline_display_mode_no_images">No images</string>
<string name="headline_display_mode_compact">Compact</string>
<string name="version">Version: %1$s (%2$d)</string>
<string name="prefs_enable_crash_reporting">Report crashes to tt-rss.org</string>
<string name="crash_dialog_text">Unfortunately, Tiny Tiny RSS has stopped. Submit crash report to tt-rss.org?</string>
</resources>

View File

@ -187,6 +187,11 @@
android:defaultValue="false"
android:key="transport_debugging"
android:title="@string/transport_debugging" />
<CheckBoxPreference
android:defaultValue="false"
android:key="enable_crash_reporting"
android:title="@string/prefs_enable_crash_reporting" />
</PreferenceCategory>
<Preference