# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Ctors | Methods | Inherited Methods

# BugreportManager.BugreportCallback

`public static abstract class BugreportManager.BugreportCallback`
`extends Object` ``

java.lang.Object
↳ | android.os.BugreportManager.BugreportCallback

An interface describing the callback for bugreport progress and status.

Callers will receive `onProgress(float)` calls as the bugreport progresses, followed by a terminal call to either `onFinished()` or `onError(int)`.

If an issue is encountered while starting the bugreport asynchronously, callers will receive an `onError(int)` call without any `onProgress(float)` callbacks.

## Summary

### Constants
`int` | `BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS` There is currently a bugreport running.
`int` | `BUGREPORT_ERROR_INVALID_INPUT` The input options were invalid.
`int` | `BUGREPORT_ERROR_RUNTIME` A runtime error occurred.
`int` | `BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT` The request to get user consent timed out.
`int` | `BUGREPORT_ERROR_USER_DENIED_CONSENT` User denied consent to share the bugreport.

### Public constructors
`BugreportCallback()`

### Public methods
`void` | `onEarlyReportFinished()` Called when it is ready for calling app to show UI, showing any extra UI before this callback can interfere with bugreport generation.
`void` | `onError(int errorCode)` Called when taking bugreport resulted in an error.
`void` | `onFinished()` Called when taking bugreport finishes successfully.
`void` | `onProgress(float progress)` Called when there is a progress update.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS

    public static final int BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS

There is currently a bugreport running. The caller should try again later.

Constant Value: 5 (0x00000005)

### BUGREPORT_ERROR_INVALID_INPUT

    public static final int BUGREPORT_ERROR_INVALID_INPUT

The input options were invalid. For example, the destination file the app provided could not be written by the system.

Constant Value: 1 (0x00000001)

### BUGREPORT_ERROR_RUNTIME

    public static final int BUGREPORT_ERROR_RUNTIME

A runtime error occurred.

Constant Value: 2 (0x00000002)

### BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT

    public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT

The request to get user consent timed out.

Constant Value: 4 (0x00000004)

### BUGREPORT_ERROR_USER_DENIED_CONSENT

    public static final int BUGREPORT_ERROR_USER_DENIED_CONSENT

User denied consent to share the bugreport.

Constant Value: 3 (0x00000003)

## Public constructors

### BugreportCallback

    public BugreportCallback ()

## Public methods

### onEarlyReportFinished

    public void onEarlyReportFinished ()

Called when it is ready for calling app to show UI, showing any extra UI before this callback can interfere with bugreport generation.

### onError

    public void onError (int errorCode)

Called when taking bugreport resulted in an error.

If `BUGREPORT_ERROR_USER_DENIED_CONSENT` is passed, then the user did not consent to sharing the bugreport with the calling app.

If `BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT` is passed, then the consent timed out, but the bugreport could be available in the internal directory of dumpstate for manual retrieval.

If `BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS` is passed, then the caller should try later, as only one bugreport can be in progress at a time.

Parameters
`errorCode` | `int`: Value is `BUGREPORT_ERROR_INVALID_INPUT`, `BUGREPORT_ERROR_RUNTIME`, `BUGREPORT_ERROR_USER_DENIED_CONSENT`, `BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT`, or `BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS`

### onFinished

    public void onFinished ()

Called when taking bugreport finishes successfully.

### onProgress

    public void onProgress (float progress)

Called when there is a progress update.

Parameters
`progress` | `float`: the progress in [0.0, 100.0] Value is between 0f and 100f inclusive

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*