Skip to content

Commit

Permalink
Implement error reporting through ACRA (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ning-y authored Aug 13, 2019
1 parent 0a0f94d commit fc09601
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ task fetchStrideSrc {
}
preBuild.dependsOn fetchStrideSrc


dependencies {
implementation 'ch.acra:acra-dialog:5.4.0'
implementation 'ch.acra:acra-mail:5.4.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.10.0'
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<application
android:allowBackup="false"
android:name=".PalantirApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/java/io/ningyuan/palantir/PalantirApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.ningyuan.palantir;

import android.app.Application;
import android.content.Context;

import org.acra.ACRA;
import org.acra.BuildConfig;
import org.acra.annotation.AcraCore;
import org.acra.annotation.AcraDialog;
import org.acra.annotation.AcraMailSender;

@AcraCore(buildConfigClass = BuildConfig.class)
@AcraMailSender(mailTo = "[email protected]")
@AcraDialog(resText=R.string.acra_title)
public class PalantirApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
ACRA.init(this);
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
</p>
]]>
</string>
<string name="acra_title">Sorry, Palantir has crashed. Please click \'OK\' to send a crash report.</string>

<string name="ux_model_renderable_not_yet_set">Click on the bottom-right button to import a 3D model</string>

Expand Down

0 comments on commit fc09601

Please sign in to comment.