You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added support for file attachments and annotations
- Added battery level and status attributes
- Added screen brightness attribute
- Fixed Android version attribute
- Fixed bug with negative number of lines in stacktrace
- Filtered out the frames from the Backtrace library
- Simplified BacktraceClient class, removed 'send' and 'async' methods overwrites
- Replaced spaces with underscore in all enums strings
Copy file name to clipboardExpand all lines: README.md
+39-29Lines changed: 39 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
12
12
13
13
14
-
[Backtrace](http://backtrace.io/)'s integration with Android applications written in Java allows customers to capture and report handled and unhandled java exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.
14
+
[Backtrace](http://backtrace.io/)'s integration with Android applications written in Java or Kotlin which allows customers to capture and report handled and unhandled java exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.
15
15
16
16
17
17
## Usage
@@ -52,39 +52,53 @@ catch (e: Exception) {
52
52
7.[Architecture](#architecture)
53
53
54
54
55
-
# Download
56
-
Gradle
55
+
# Features Summary <aname="features-summary"></a>
56
+
* Light-weight Java client library that quickly submits exceptions and crashes to your Backtrace dashboard. Can include callstack, system metadata, custom metadata and file attachments if needed.<!--, and file attachments if needed.-->
57
+
* Supports a wide range of Android SDKs.
58
+
* Supports asynchronous Tasks.
59
+
* Fully customizable and extendable event handlers and base classes for custom implementations.
60
+
61
+
# Supported SDKs <aname="supported-sdks"></a>
62
+
* Minimal SDK version 19 (Android 4.4)
63
+
* Target SDK version 28 (Android 9.0)
64
+
65
+
# Differences and limitations of the SDKs version <aname="limitations"></a>
66
+
* Getting the status that the device is in power saving mode is available from API 21.
* Light-weight Java client library that quickly submits exceptions and crashes to your Backtrace dashboard. Can include callstack, system metadata, custom metadata.<!--, and file attachments if needed.-->
75
-
* Supports a wide range of Android SDKs.
76
-
* Supports asynchronous Tasks.
77
-
* Fully customizable and extendable event handlers and base classes for custom implementations.
87
+
## Permissions
88
+
### Internet permission
89
+
* To send errors to the server instance you need to add permissions for Internet connection into `AndroidManifest.xml` file in your application.
# Differences and limitations of the SDKs version <aname="limitations"></a>
95
+
### File access
96
+
* To send file attachments from external storage to the server instance you need to add permissions for read external storage into `AndroidManifest.xml` file in your application.
## Android Studio <aname="sample-app-android-studio"></a>
@@ -142,8 +156,8 @@ try {
142
156
newHashMap<String, Object>() {{
143
157
put("key", "value");
144
158
}}, newArrayList<String>() {{
145
-
add("file_path_1");
146
-
add("file_path2");
159
+
add("absoulte_file_path_1");
160
+
add("absoulte_file_path_2");
147
161
}});
148
162
backtraceClient.send(report);
149
163
}
@@ -155,12 +169,12 @@ try {
155
169
// throw exception here
156
170
}
157
171
catch (e:Exception) {
158
-
val report =BacktraceReport(e, mapOf("key" to "value"), listOf("file_path_1", "file_path_2"))
172
+
val report =BacktraceReport(e, mapOf("key" to "value"), listOf("absolute_file_path_1", "absolute_file_path_2"))
159
173
backtraceClient.send(report)
160
174
}
161
175
```
162
176
163
-
####Asynchronous Send Support
177
+
### Asynchronous Send support
164
178
165
179
Method `send` behind the mask use `AsyncTask` and wait until method `doInBackground` is not completed. Library gives you the option of not blocking code execution by using method `sendAsync` which returning the `AsyncTask<Void, Void, BacktraceResult>` object. Additionally, it is possible to specify the method that should be performed after completion `AsyncTask` by using events described in [events](#events).
166
180
@@ -179,7 +193,7 @@ val sendAsyncTask = backtraceClient.sendAsync(report)
179
193
val result = asynctask.get()
180
194
```
181
195
182
-
### Other BacktraceReport Overloads
196
+
### Other BacktraceReport overloads
183
197
184
198
`BacktraceClient` can also automatically create `BacktraceReport` given an exception or a custom message using the following overloads of the `BacktraceClient.send` or `BacktraceClient.sendAsync` methods:
185
199
@@ -268,14 +282,10 @@ You can extend `BacktraceBase` to create your own Backtrace client and error rep
**`BacktraceApi`** is a class that sends diagnostic JSON to the Backtrace endpoint. `BacktraceApi` is instantiated when the `BacktraceClient` constructor is called. You use the following event handlers in `BacktraceApi` to customize how you want to handle JSON data:
271
-
-`RequestHandler` - attach an event handler to this event to override the default `BacktraceApi.send`method. <!--A `RequestHandler` TODO -->
272
-
-`OnServerError` - attach an event handler to be invoked when the server returns with a `400 bad request`, `401 unauthorized` or other HTTP error codes.<!-- TODO -->
285
+
-`RequestHandler` - attach an event handler to this event to override the default `BacktraceApi.send`and `BacktraceApi.sendAsync` methods.
286
+
-`OnServerError` - attach an event handler to be invoked when the server returns with a `400 bad request`, `401 unauthorized` or other HTTP error codes.
273
287
-`OnServerResponse` - attach an event handler to be invoked when the server returns with a valid response.
**`BacktraceResult`** is a class that holds response and result from a `send` or `sendAsync` call. The class contains a `Status` property that indicates whether the call was completed (`OK`), the call returned with an error (`ServerError`), . Additionally, the class has a `Message` property that contains details about the status.
278
-
279
-
280
-
281
-
291
+
**`BacktraceResult`** is a class that holds response and result from a `send` or `sendAsync` call. The class contains a `Status` property that indicates whether the call was completed (`OK`), the call returned with an error (`ServerError`), . Additionally, the class has a `Message` property that contains details about the status.
0 commit comments