mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 13:59:29 +00:00
User can disable crash reporting.
This commit is contained in:
parent
84bc2f1fd4
commit
5d1d7fe5c3
@ -100,11 +100,13 @@ public class MainActivity extends AppCompatActivity implements
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
//Initialize crash reporter
|
||||
//Initialize crash reporter (if enabled)
|
||||
if(PreferencesUtils.getBoolean(this, "enable_crash_reporting", true)){
|
||||
CrashReporter reporter = new CrashReporter(this, BuildConfig.crash_reporter_url,
|
||||
BuildConfig.crash_reporter_key);
|
||||
reporter.uploadAwaitingReport();
|
||||
Thread.setDefaultUncaughtExceptionHandler(reporter);
|
||||
}
|
||||
|
||||
//Initialize account objects
|
||||
accountHelper = new AccountHelper(this);
|
||||
|
@ -209,4 +209,6 @@
|
||||
<string name="notif_sent_group_membership_request">sent a request to join the group</string>
|
||||
<string name="notif_accepted_group_membership_request">accepted your request to join the group</string>
|
||||
<string name="notif_rejected_group_membership_request">rejected your request to join the group</string>
|
||||
<string name="preference_crash_reporting_title">Send crash reports</string>
|
||||
<string name="preference_crash_reporting_summary">Help us improve Comunic by sending anonymous reports when the application crash.</string>
|
||||
</resources>
|
||||
|
@ -16,4 +16,11 @@
|
||||
android:title="@string/preference_debug_mode_title"
|
||||
android:summary="@string/preference_debug_mode_summary" />
|
||||
|
||||
<!-- Enable or disable crash reporting -->
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="enable_crash_reporting"
|
||||
android:title="@string/preference_crash_reporting_title"
|
||||
android:summary="@string/preference_crash_reporting_summary"/>
|
||||
|
||||
</PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user