Skip to content

Commit 176b756

Browse files
Update README.md
1 parent 3f970f1 commit 176b756

File tree

1 file changed

+39
-29
lines changed

1 file changed

+39
-29
lines changed

README.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313

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.
1515

1616

1717
## Usage
@@ -52,39 +52,53 @@ catch (e: Exception) {
5252
7. [Architecture](#architecture)
5353

5454

55-
# Download
56-
Gradle
55+
# Features Summary <a name="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 <a name="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 <a name="limitations"></a>
66+
* Getting the status that the device is in power saving mode is available from API 21.
67+
68+
# Installation <a name="installation"></a>
69+
## Download library via Gradle or Maven
70+
* Gradle
5771
```
5872
dependencies {
59-
implementation 'com.github.backtrace-labs.backtrace-android:backtrace-library:1.0'
73+
implementation 'com.github.backtrace-labs.backtrace-android:backtrace-library:1.1.0'
6074
}
6175
```
6276

63-
Maven
77+
* Maven
6478
```
6579
<dependency>
6680
<groupId>com.github.backtrace-labs.backtrace-android</groupId>
6781
<artifactId>backtrace-library</artifactId>
68-
<version>1.0</version>
82+
<version>1.1.0</version>
6983
<type>aar</type>
7084
</dependency>
7185
```
7286

73-
# Features Summary <a name="features-summary"></a>
74-
* 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.
7890

91+
```xml
92+
<uses-permission android:name="android.permission.INTERNET" />
93+
```
7994

80-
# Differences and limitations of the SDKs version <a name="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.
8197

82-
# Supported SDKs <a name="supported-sdks"></a>
83-
* Minimal SDK version 19 (Android 4.4)
84-
* Target SDK version 28 (Android 9.0)
98+
```xml
99+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
100+
```
85101

86-
# Installation <a name="installation"></a>
87-
TODO
88102

89103
# Running sample application
90104
## Android Studio <a name="sample-app-android-studio"></a>
@@ -142,8 +156,8 @@ try {
142156
new HashMap<String, Object>() {{
143157
put("key", "value");
144158
}}, new ArrayList<String>() {{
145-
add("file_path_1");
146-
add("file_path2");
159+
add("absoulte_file_path_1");
160+
add("absoulte_file_path_2");
147161
}});
148162
backtraceClient.send(report);
149163
}
@@ -155,12 +169,12 @@ try {
155169
// throw exception here
156170
}
157171
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"))
159173
backtraceClient.send(report)
160174
}
161175
```
162176

163-
#### Asynchronous Send Support
177+
### Asynchronous Send support
164178

165179
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).
166180

@@ -179,7 +193,7 @@ val sendAsyncTask = backtraceClient.sendAsync(report)
179193
val result = asynctask.get()
180194
```
181195

182-
### Other BacktraceReport Overloads
196+
### Other BacktraceReport overloads
183197

184198
`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:
185199

@@ -268,14 +282,10 @@ You can extend `BacktraceBase` to create your own Backtrace client and error rep
268282

269283
## BacktraceApi <a name="architecture-BacktraceApi"></a>
270284
**`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.
273287
- `OnServerResponse` - attach an event handler to be invoked when the server returns with a valid response.
274288

275289

276290
## BacktraceResult <a name="architecture-BacktraceResult"></a>
277-
**`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

Comments
 (0)