Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions bugsnag-android-core/src/main/java/com/bugsnag/android/Bugsnag.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
* Static access to a Bugsnag Client, the easiest way to use Bugsnag in your Android app.
* For example:
* <p>
* <pre>{@code
* Bugsnag.start(this, "your-api-key");
* Bugsnag.notify(new RuntimeException("something broke!"));
* }</pre>
*
* @see Client
*/
Expand Down Expand Up @@ -72,7 +74,7 @@ public static Client start(@NonNull Context androidContext, @NonNull Configurati
/**
* Returns true if one of the <code>start</code> methods have been has been called and
* so Bugsnag is initialized; false if <code>start</code> has not been called and the
* other methods will throw IllegalStateException.
* other methods will throw {@code IllegalStateException}.
*/
public static boolean isStarted() {
return client != null;
Expand Down Expand Up @@ -149,12 +151,12 @@ public static User getUser() {
* <p>
* For example:
* <p>
* Bugsnag.addOnError(new OnErrorCallback() {
* public boolean run(Event event) {
* event.setSeverity(Severity.INFO);
* return true;
* }
* })
* <pre>{@code
* Bugsnag.addOnError((Event event) -> {
* event.setSeverity(Severity.INFO);
* return true;
* });
* }</pre>
*
* @param onError a callback to run before sending errors to Bugsnag
* @see OnErrorCallback
Expand All @@ -181,11 +183,11 @@ public static void removeOnError(@NonNull OnErrorCallback onError) {
* <p>
* For example:
* <p>
* Bugsnag.onBreadcrumb(new OnBreadcrumbCallback() {
* public boolean run(Breadcrumb breadcrumb) {
* return false; // ignore the breadcrumb
* }
* })
* <pre>{@code
* Bugsnag.onBreadcrumb((Breadcrumb breadcrumb) -> {
* return false; // ignore the breadcrumb
* });
* }</pre>
*
* @param onBreadcrumb a callback to run before a breadcrumb is captured
* @see OnBreadcrumbCallback
Expand All @@ -212,11 +214,11 @@ public static void removeOnBreadcrumb(@NonNull OnBreadcrumbCallback onBreadcrumb
* <p>
* For example:
* <p>
* Bugsnag.onSession(new OnSessionCallback() {
* public boolean run(Session session) {
* return false; // ignore the session
* }
* })
* <pre>{@code
* Bugsnag.onSession((Session session) -> {
* return false; // ignore the session
* });
* }</pre>
*
* @param onSession a callback to run before a session is captured
* @see OnSessionCallback
Expand Down
Loading
Loading