This repository was archived by the owner on Jan 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Crash logging #49
Merged
Merged
Crash logging #49
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0ce2de3
cleaned PR template
772d915
cleaned PR template
87bbee4
Merge pull request #47 from Keyspace-cloud/PR_template_trimming
0x4f53 008b53a
added acra skeleton
1a940c5
implemented crash handler
4e4ece0
removed generic exception handlers
5bc31a5
removed generic exception handlers
bb6e078
added an email subject prefix
d24ff2c
Update app/src/main/res/values/strings.xml
0x4f53 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| package cloud.keyspace.android | ||
|
|
||
| import android.app.Application | ||
| import android.content.Context | ||
| import org.acra.config.dialog | ||
| import org.acra.config.mailSender | ||
| import org.acra.data.StringFormat | ||
| import org.acra.ktx.initAcra | ||
| import java.time.Instant | ||
| import java.time.format.DateTimeFormatter | ||
|
|
||
| class Keyspace : Application() { | ||
| override fun attachBaseContext(base: Context) { | ||
| super.attachBaseContext(base) | ||
| initAcra { | ||
| buildConfigClass = BuildConfig::class.java | ||
| reportFormat = StringFormat.KEY_VALUE_LIST | ||
|
|
||
| dialog { | ||
| text = getString(R.string.crash_send_logs_description) | ||
| title = " " + getString(R.string.app_name) | ||
| positiveButtonText = getString(R.string.crash_send_positive_button_text) | ||
| negativeButtonText = getString(R.string.exit) | ||
| resIcon = R.drawable.keyspace | ||
| resTheme = android.R.style.Theme_Material_Dialog | ||
| } | ||
|
|
||
| mailSender { | ||
| mailTo = getString(R.string.support_email) | ||
| reportAsFile = true | ||
| reportFileName = "android_bug_report_${DateTimeFormatter.ISO_INSTANT.format(Instant.now())}.txt" | ||
| subject = getString(R.string.crash_send_logs_email_subject) | ||
| body = getString(R.string.crash_send_logs_email_body) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.