Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/app/ApplicationErrorReport#nestedclasses) \| [Constants](https://developer.android.com/reference/android/app/ApplicationErrorReport#constants) \| [Inherited Constants](https://developer.android.com/reference/android/app/ApplicationErrorReport#inhconstants) \| [Fields](https://developer.android.com/reference/android/app/ApplicationErrorReport#lfields) \| [Ctors](https://developer.android.com/reference/android/app/ApplicationErrorReport#pubctors) \| [Methods](https://developer.android.com/reference/android/app/ApplicationErrorReport#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/ApplicationErrorReport#inhmethods)

# ApplicationErrorReport

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/ApplicationErrorReport "View this page in Kotlin") \|Java


`
public


class
ApplicationErrorReport
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.ApplicationErrorReport |

<br />

*** ** * ** ***

Describes an application error.

A report has a type, which is one of

- `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_NONE` uninitialized instance of `https://developer.android.com/reference/android/app/ApplicationErrorReport`.
- `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_CRASH` application crash. Information about the crash is stored in `https://developer.android.com/reference/android/app/ApplicationErrorReport#crashInfo`.
- `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_ANR` application not responding. Information about the ANR is stored in `https://developer.android.com/reference/android/app/ApplicationErrorReport#anrInfo`.
- `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_BATTERY` user reported application is using too much battery. Information about the battery use is stored in `https://developer.android.com/reference/android/app/ApplicationErrorReport#batteryInfo`.
- `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_RUNNING_SERVICE` user reported application is leaving an unneeded serive running. Information about the battery use is stored in `https://developer.android.com/reference/android/app/ApplicationErrorReport#runningServiceInfo`.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/app/ApplicationErrorReport.AnrInfo` Describes an application not responding error. |
| ` class` | `https://developer.android.com/reference/android/app/ApplicationErrorReport.BatteryInfo` Describes a battery usage report. |
| ` class` | `https://developer.android.com/reference/android/app/ApplicationErrorReport.CrashInfo` Describes an application crash. |
| ` class` | `https://developer.android.com/reference/android/app/ApplicationErrorReport.RunningServiceInfo` Describes a running service report. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_ANR` An error report about an application that's not responding. |
| `int` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_BATTERY` An error report about an application that's consuming too much battery. |
| `int` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_CRASH` An error report about an application crash. |
| `int` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_NONE` Uninitialized error report. |
| `int` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_RUNNING_SERVICE` A report from a user to a developer about a running service that the user doesn't think should be running. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/app/ApplicationErrorReport>` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#CREATOR` |
| ` public https://developer.android.com/reference/android/app/ApplicationErrorReport.AnrInfo` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#anrInfo` If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_ANR`, contains an instance of AnrInfo describing the ANR; otherwise null. |
| ` public https://developer.android.com/reference/android/app/ApplicationErrorReport.BatteryInfo` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#batteryInfo` If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_BATTERY`, contains an instance of BatteryInfo; otherwise null. |
| ` public https://developer.android.com/reference/android/app/ApplicationErrorReport.CrashInfo` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#crashInfo` If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_CRASH`, contains an instance of CrashInfo describing the crash; otherwise null. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#installerPackageName` Package name of the application which installed the application this report pertains to. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#packageName` Package name of the application. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#processName` Process name of the application. |
| ` public https://developer.android.com/reference/android/app/ApplicationErrorReport.RunningServiceInfo` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#runningServiceInfo` If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_RUNNING_SERVICE`, contains an instance of RunningServiceInfo; otherwise null. |
| ` public boolean` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#systemApp` Set if the app is on the system image. |
| ` public long` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#time` Time at which the error occurred. |
| ` public int` | `https://developer.android.com/reference/android/app/ApplicationErrorReport#type` Type of this report. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/app/ApplicationErrorReport#ApplicationErrorReport()() ` Create an uninitialized instance of `https://developer.android.com/reference/android/app/ApplicationErrorReport`. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/app/ApplicationErrorReport#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` void` | ` https://developer.android.com/reference/android/app/ApplicationErrorReport#dump(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` Dump the report to a Printer. |
| ` static https://developer.android.com/reference/android/content/ComponentName` | ` https://developer.android.com/reference/android/app/ApplicationErrorReport#getErrorReportReceiver(android.content.Context,%20java.lang.String,%20int)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/java/lang/String packageName, int appFlags) ` |
| ` void` | ` https://developer.android.com/reference/android/app/ApplicationErrorReport#readFromParcel(android.os.Parcel)(https://developer.android.com/reference/android/os/Parcel in) ` |
| ` void` | ` https://developer.android.com/reference/android/app/ApplicationErrorReport#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### TYPE_ANR

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_ANR
```

An error report about an application that's not responding.

<br />

Constant Value:

2
(0x00000002)


### TYPE_BATTERY

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_BATTERY
```

An error report about an application that's consuming too much battery.

<br />

Constant Value:

3
(0x00000003)


### TYPE_CRASH

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_CRASH
```

An error report about an application crash.

<br />

Constant Value:

1
(0x00000001)


### TYPE_NONE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_NONE
```

Uninitialized error report.

<br />

Constant Value:

0
(0x00000000)


### TYPE_RUNNING_SERVICE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_RUNNING_SERVICE
```

A report from a user to a developer about a running service that the
user doesn't think should be running.

<br />

Constant Value:

5
(0x00000005)


## Fields

### CREATOR

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<ApplicationErrorReport> CREATOR
```

<br />

<br />

### anrInfo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ApplicationErrorReport.AnrInfo anrInfo
```

If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_ANR`, contains an instance
of AnrInfo describing the ANR; otherwise null.

<br />

### batteryInfo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ApplicationErrorReport.BatteryInfo batteryInfo
```

If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_BATTERY`, contains an instance
of BatteryInfo; otherwise null.

<br />

### crashInfo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ApplicationErrorReport.CrashInfo crashInfo
```

If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_CRASH`, contains an instance
of CrashInfo describing the crash; otherwise null.

<br />

### installerPackageName

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String installerPackageName
```

Package name of the application which installed the application this
report pertains to.
This identifies which market the application came from.

<br />

### packageName

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String packageName
```

Package name of the application.

<br />

### processName

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String processName
```

Process name of the application.

<br />

### runningServiceInfo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ApplicationErrorReport.RunningServiceInfo runningServiceInfo
```

If this report is of type `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_RUNNING_SERVICE`, contains an instance
of RunningServiceInfo; otherwise null.

<br />

### systemApp

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean systemApp
```

Set if the app is on the system image.

<br />

### time

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long time
```

Time at which the error occurred.

<br />

### type

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int type
```

Type of this report. Can be one of `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_NONE`,
`https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_CRASH`, `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_ANR`, `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_BATTERY`,
or `https://developer.android.com/reference/android/app/ApplicationErrorReport#TYPE_RUNNING_SERVICE`.

<br />

## Public constructors

### ApplicationErrorReport

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ApplicationErrorReport ()
```

Create an uninitialized instance of `https://developer.android.com/reference/android/app/ApplicationErrorReport`.

<br />

## Public methods

### describeContents

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### dump

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dump (Printer pw, 
                String prefix)
```

Dump the report to a Printer.

<br />

| Parameters ||
|---|---|
| `pw` | `Printer` <br /> |
| `prefix` | `String` <br /> |

### getErrorReportReceiver

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ComponentName getErrorReportReceiver (Context context, 
                String packageName, 
                int appFlags)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `packageName` | `String` <br /> |
| `appFlags` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName` | <br /> |

### readFromParcel

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void readFromParcel (Parcel in)
```

<br />

<br />

| Parameters ||
|---|---|
| `in` | `Parcel` <br /> |

### writeToParcel

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |