1
- # ExceptionReport
1
+ # ExceptionReport [ ![ ] ( https://jitpack.io/v/cnrture/ExceptionReport.svg )] ( https://jitpack.io/#cnrture/ExceptionReport )
2
2
3
- ## Implementation [ ![ ] ( https://jitpack.io/v/cnrture/ExceptionReport.svg )] ( https://jitpack.io/#cnrture/ExceptionReport )
3
+ ## Implementation
4
4
``` kotlin
5
5
allprojects {
6
6
repositories {
@@ -14,6 +14,7 @@ dependencies {
14
14
```
15
15
16
16
## Usage
17
+ ### Default
17
18
``` kotlin
18
19
class MainActivity : AppCompatActivity () {
19
20
@@ -28,8 +29,43 @@ class MainActivity : AppCompatActivity() {
28
29
}
29
30
}
30
31
```
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
+ ```
31
65
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 " />|
33
69
34
70
## License
35
71
0 commit comments