1- # ExceptionReport
1+ # ExceptionReport [ ![ ] ( https://jitpack.io/v/cnrture/ExceptionReport.svg )] ( https://jitpack.io/#cnrture/ExceptionReport )
22
3- ## Implementation [ ![ ] ( https://jitpack.io/v/cnrture/ExceptionReport.svg )] ( https://jitpack.io/#cnrture/ExceptionReport )
3+ ## Implementation
44``` kotlin
55allprojects {
66 repositories {
@@ -14,6 +14,7 @@ dependencies {
1414```
1515
1616## Usage
17+ ### Default
1718``` kotlin
1819class MainActivity : AppCompatActivity () {
1920
@@ -28,8 +29,43 @@ class MainActivity : AppCompatActivity() {
2829 }
2930}
3031```
32+ ### Custom Activity
33+ ``` kotlin
34+ class MainActivity : AppCompatActivity () {
35+
36+ private lateinit var binding: ActivityMainBinding
37+
38+ override fun onCreate (savedInstanceState : Bundle ? ) {
39+ super .onCreate(savedInstanceState)
40+ binding = ActivityMainBinding .inflate(layoutInflater)
41+ setContentView(binding.root)
42+
43+ ExceptionReport (this , R .color.teal_700) // Color is optional
44+ .setCustomActivity(CustomExceptionActivity ::class .java)
45+ }
46+ }
47+ ```
48+ ### Solution Module
49+ It works with the ChatGPT completion endpoint. To use it, get your own API key from the [ link] ( https://platform.openai.com/account/api-keys ) and include it in the code.
50+ ``` kotlin
51+ class MainActivity : AppCompatActivity () {
52+
53+ private lateinit var binding: ActivityMainBinding
54+
55+ override fun onCreate (savedInstanceState : Bundle ? ) {
56+ super .onCreate(savedInstanceState)
57+ binding = ActivityMainBinding .inflate(layoutInflater)
58+ setContentView(binding.root)
59+
60+ ExceptionReport (this , R .color.teal_700) // Color is optional
61+ .enableSolutionFeature(" Bearer $YourAPIKey " )
62+ }
63+ }
64+ ```
3165
32- <img src =" https://user-images.githubusercontent.com/29903779/227750365-f650bd85-c915-40c7-9b89-3ebe98691585.gif " />
66+ | Default | Custom Activity | Solution Feature |
67+ | ------- | -------------------- | -------------------- |
68+ | <img src =" https://github.com/cnrture/ExceptionReport/assets/29903779/ffd3946d-7897-4fe2-8396-afcdea342c4a " />| <img src =" https://github.com/cnrture/ExceptionReport/assets/29903779/f8bdb90f-7bf8-439a-9ca9-11476908406d " />| <img src =" https://github.com/cnrture/ExceptionReport/assets/29903779/32e400fb-f994-49c3-a0b2-c1e46a4fb56f " />|
3369
3470## License
3571
0 commit comments