Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/app/AnrTypes#constants) \| [Inherited Methods](https://developer.android.com/reference/android/app/AnrTypes#inhmethods)

# AnrTypes

*** ** * ** ***

` public final class AnrTypes `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

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

<br />

*** ** * ** ***

Defines the types of Application Not Responding (ANR) errors.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_APPLICATION_START` The app took too long to start up. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_APP_TRIGGERED` The app itself due to its own internal logic or behavior has triggered an ANR. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_BROADCAST_OF_INTENT` The app's broadcast receiver took too long to process the message. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_CONTENT_PROVIDER_NOT_RESPONDING` The app's content provider took too long to respond. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_EXECUTE_SERVICE` The app's service took too long to finish `https://developer.android.com/reference/android/app/Service#onCreate()` and `https://developer.android.com/reference/android/app/Service#onStartCommand(android.content.Intent,%20int,%20int)` / `https://developer.android.com/reference/android/app/Service#onBind(android.content.Intent)` |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_FOREGROUND_SHORT_SERVICE_TIMEOUT` A foreground short service took too long to respond to `https://developer.android.com/reference/android/app/Service#onTimeout(int)`. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_INPUT_DISPATCH` The app took too long to respond to an input event. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_INPUT_DISPATCH_NO_FOCUSED_WINDOW` The app took too long to respond to an input event because no window was focused. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_JOB_SERVICE_START` The job service took too long to start. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_OTHER` The ANR type is not one of the other defined types. |
| `int` | `https://developer.android.com/reference/android/app/AnrTypes#ANR_TYPE_START_FOREGROUND_SERVICE` The foreground service took too long to start. |

### 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*.

## Constants

### ANR_TYPE_APPLICATION_START

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

```
public static final int ANR_TYPE_APPLICATION_START
```

The app took too long to start up.

<br />

Constant Value: 10 (0x0000000a)

### ANR_TYPE_APP_TRIGGERED

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

```
public static final int ANR_TYPE_APP_TRIGGERED
```

The app itself due to its own internal logic or behavior has triggered an ANR.

<br />

Constant Value: 7 (0x00000007)

### ANR_TYPE_BROADCAST_OF_INTENT

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

```
public static final int ANR_TYPE_BROADCAST_OF_INTENT
```

The app's broadcast receiver took too long to process the message.

<br />

Constant Value: 3 (0x00000003)

### ANR_TYPE_CONTENT_PROVIDER_NOT_RESPONDING

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

```
public static final int ANR_TYPE_CONTENT_PROVIDER_NOT_RESPONDING
```

The app's content provider took too long to respond.

<br />

Constant Value: 6 (0x00000006)

### ANR_TYPE_EXECUTE_SERVICE

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

```
public static final int ANR_TYPE_EXECUTE_SERVICE
```

The app's service took too long to finish `https://developer.android.com/reference/android/app/Service#onCreate()` and `https://developer.android.com/reference/android/app/Service#onStartCommand(android.content.Intent,%20int,%20int)` / `https://developer.android.com/reference/android/app/Service#onBind(android.content.Intent)`

<br />

Constant Value: 5 (0x00000005)

### ANR_TYPE_FOREGROUND_SHORT_SERVICE_TIMEOUT

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

```
public static final int ANR_TYPE_FOREGROUND_SHORT_SERVICE_TIMEOUT
```

A foreground short service took too long to respond to `https://developer.android.com/reference/android/app/Service#onTimeout(int)`.

<br />

Constant Value: 8 (0x00000008)

### ANR_TYPE_INPUT_DISPATCH

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

```
public static final int ANR_TYPE_INPUT_DISPATCH
```

The app took too long to respond to an input event.

<br />

Constant Value: 2 (0x00000002)

### ANR_TYPE_INPUT_DISPATCH_NO_FOCUSED_WINDOW

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

```
public static final int ANR_TYPE_INPUT_DISPATCH_NO_FOCUSED_WINDOW
```

The app took too long to respond to an input event because no window was focused.

<br />

Constant Value: 1 (0x00000001)

### ANR_TYPE_JOB_SERVICE_START

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

```
public static final int ANR_TYPE_JOB_SERVICE_START
```

The job service took too long to start.

<br />

Constant Value: 9 (0x00000009)

### ANR_TYPE_OTHER

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

```
public static final int ANR_TYPE_OTHER
```

The ANR type is not one of the other defined types.

This is used as a default when the specific cause of the ANR is not known or does not fit into a more specific category

<br />

Constant Value: 0 (0x00000000)

### ANR_TYPE_START_FOREGROUND_SERVICE

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

```
public static final int ANR_TYPE_START_FOREGROUND_SERVICE
```

The foreground service took too long to start.

<br />

Constant Value: 4 (0x00000004)