Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#constants) \| [Inherited Constants](https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#inhconstants) \| [Fields](https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#lfields) \| [Methods](https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#inhmethods)

# EmergencyNumber

*** ** * ** ***

` public final class EmergencyNumber `   
` extends https://developer.android.com/reference/java/lang/Object ` ` implements https://developer.android.com/reference/java/lang/Comparable<https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber>, https://developer.android.com/reference/android/os/Parcelable `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.telephony.emergency.EmergencyNumber |

<br />

*** ** * ** ***

A parcelable class that wraps and retrieves the information of number, service category(s) and country code for a specific emergency number.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_CALL_ROUTING_EMERGENCY` Indicates the radio or IMS implementation must handle the call through emergency routing. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_CALL_ROUTING_NORMAL` Indicates the radio or IMS implementation must handle the call through normal call routing. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_CALL_ROUTING_UNKNOWN` Indicated the framework does not know whether an emergency call should be placed using emergency or normal call routing. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DATABASE` Bit-field which indicates the number is from the platform-maintained database. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DEFAULT` Bit-field which indicates the number is available as default. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG` Bit-field which indicates the number is from the modem config. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING` Bit-field which indicates the number is from the network signaling. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_SIM` Bit-field which indicates the number is from the sim. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AIEC` Bit-field that indicates Emergency Service Category for Automatically Initiated eCall (AIeC) Reference: 3gpp 22.101, Section 10 - Emergency Calls |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AMBULANCE` Bit-field that indicates Emergency Service Category for Ambulance. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_FIRE_BRIGADE` Bit-field that indicates Emergency Service Category for Fire Brigade. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MARINE_GUARD` Bit-field that indicates Emergency Service Category for Marine Guard. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MIEC` Bit-field that indicates Emergency Service Category for Manually Initiated eCall (MIeC) Reference: 3gpp 22.101, Section 10 - Emergency Calls |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MOUNTAIN_RESCUE` Bit-field that indicates Emergency Service Category for Mountain Rescue. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_POLICE` Bit-field that indicates Emergency Service Category for Police. |
| `int` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED` Emergency Service Category UNSPECIFIED (General emergency call, all categories) bit-field indicates that no specific services are associated with this emergency number; if the emergency number is specified, it has one or more defined emergency service categories. |

### 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/telephony/emergency/EmergencyNumber>` | `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#CREATOR` <br /> |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#compareTo(android.telephony.emergency.EmergencyNumber)(https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber emergencyNumber) ` Compare the display priority for this emergency number and the supplied emergency number. |
| ` int` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getCountryIso()() ` Get the country code string (lowercase character) in ISO 3166 format of the emergency number. |
| ` int` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getEmergencyCallRouting()() ` Returns the emergency call routing information. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/Integer>` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getEmergencyNumberSources()() ` Returns a list of sources of the emergency number. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/Integer>` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getEmergencyServiceCategories()() ` Returns the emergency service categories of the emergency number. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getEmergencyUrns()() ` Returns the list of emergency Uniform Resources Names (URN) of the emergency number. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getMnc()() ` Get the Mobile Network Code of the emergency number. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#getNumber()() ` Get the dialing number of the emergency number. |
| ` int` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#isFromSources(int)(int sources) ` Checks if the emergency number is from the specified emergency number source(s). |
| ` boolean` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#isInEmergencyServiceCategories(int)(int categories) ` Checks if the emergency number is in the supplied emergency service category(s). |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#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/java/lang/Comparable ` ` abstract int` ` https://developer.android.com/reference/java/lang/Comparable#compareTo(T)(https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber o) `

Compares this object with the specified object for order.
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

### EMERGENCY_CALL_ROUTING_EMERGENCY

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

```
public static final int EMERGENCY_CALL_ROUTING_EMERGENCY
```

Indicates the radio or IMS implementation must handle the call through emergency routing.

<br />

Constant Value: 1 (0x00000001)

### EMERGENCY_CALL_ROUTING_NORMAL

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

```
public static final int EMERGENCY_CALL_ROUTING_NORMAL
```

Indicates the radio or IMS implementation must handle the call through normal call routing.

<br />

Constant Value: 2 (0x00000002)

### EMERGENCY_CALL_ROUTING_UNKNOWN

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

```
public static final int EMERGENCY_CALL_ROUTING_UNKNOWN
```

Indicated the framework does not know whether an emergency call should be placed using emergency or normal call routing. This means the underlying radio or IMS implementation is free to determine for itself how to route the call.

<br />

Constant Value: 0 (0x00000000)

### EMERGENCY_NUMBER_SOURCE_DATABASE

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

```
public static final int EMERGENCY_NUMBER_SOURCE_DATABASE
```

Bit-field which indicates the number is from the platform-maintained database.

<br />

Constant Value: 16 (0x00000010)

### EMERGENCY_NUMBER_SOURCE_DEFAULT

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

```
public static final int EMERGENCY_NUMBER_SOURCE_DEFAULT
```

Bit-field which indicates the number is available as default. 112, 911 must always be available; additionally, 000, 08, 110, 999, 118 and 119 must be available when sim is not present. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 8 (0x00000008)

### EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG

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

```
public static final int EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG
```

Bit-field which indicates the number is from the modem config.

<br />

Constant Value: 4 (0x00000004)

### EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING

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

```
public static final int EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING
```

Bit-field which indicates the number is from the network signaling. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 1 (0x00000001)

### EMERGENCY_NUMBER_SOURCE_SIM

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

```
public static final int EMERGENCY_NUMBER_SOURCE_SIM
```

Bit-field which indicates the number is from the sim. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 2 (0x00000002)

### EMERGENCY_SERVICE_CATEGORY_AIEC

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_AIEC
```

Bit-field that indicates Emergency Service Category for Automatically Initiated eCall (AIeC) Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 64 (0x00000040)

### EMERGENCY_SERVICE_CATEGORY_AMBULANCE

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_AMBULANCE
```

Bit-field that indicates Emergency Service Category for Ambulance. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 2 (0x00000002)

### EMERGENCY_SERVICE_CATEGORY_FIRE_BRIGADE

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_FIRE_BRIGADE
```

Bit-field that indicates Emergency Service Category for Fire Brigade. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 4 (0x00000004)

### EMERGENCY_SERVICE_CATEGORY_MARINE_GUARD

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_MARINE_GUARD
```

Bit-field that indicates Emergency Service Category for Marine Guard. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 8 (0x00000008)

### EMERGENCY_SERVICE_CATEGORY_MIEC

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_MIEC
```

Bit-field that indicates Emergency Service Category for Manually Initiated eCall (MIeC) Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 32 (0x00000020)

### EMERGENCY_SERVICE_CATEGORY_MOUNTAIN_RESCUE

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_MOUNTAIN_RESCUE
```

Bit-field that indicates Emergency Service Category for Mountain Rescue. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 16 (0x00000010)

### EMERGENCY_SERVICE_CATEGORY_POLICE

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_POLICE
```

Bit-field that indicates Emergency Service Category for Police. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 1 (0x00000001)

### EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED

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

```
public static final int EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED
```

Emergency Service Category UNSPECIFIED (General emergency call, all categories) bit-field indicates that no specific services are associated with this emergency number; if the emergency number is specified, it has one or more defined emergency service categories. Reference: 3gpp 22.101, Section 10 - Emergency Calls

<br />

Constant Value: 0 (0x00000000)

## Fields

### CREATOR

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

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

<br />

<br />

## Public methods

### compareTo

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

```
public int compareTo (EmergencyNumber emergencyNumber)
```

Compare the display priority for this emergency number and the supplied emergency number.

<br />

| Parameters ||
|---|---|
| `emergencyNumber` | `EmergencyNumber`: the supplied emergency number. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `int` | a negative value if the supplied emergency number has a lower display priority; a positive value if the supplied emergency number has a higher display priority; 0 if both have equal display priority. <br /> |

### describeContents

Added in [API level 29](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` |

### equals

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

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.

The `equals` method implements an equivalence relation on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.

An equivalence relation partitions the elements it operates on into *equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getCountryIso

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

```
public String getCountryIso ()
```

Get the country code string (lowercase character) in ISO 3166 format of the emergency number.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the country code string (lowercase character) in ISO 3166 format. This value cannot be `null`. <br /> |

### getEmergencyCallRouting

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

```
public int getEmergencyCallRouting ()
```

Returns the emergency call routing information.

Some regions require some emergency numbers which are not routed using typical emergency call processing, but are instead placed as regular phone calls. The emergency call routing field provides information about how an emergency call will be routed when it is placed.

<br />

| Returns ||
|---|---|
| `int` | the emergency call routing requirement. Value is one of the following: - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_CALL_ROUTING_UNKNOWN` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_CALL_ROUTING_EMERGENCY` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_CALL_ROUTING_NORMAL` |

### getEmergencyNumberSources

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

```
public List<Integer> getEmergencyNumberSources ()
```

Returns a list of sources of the emergency number.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/Integer>` | a list of emergency number sources. This value cannot be `null`. <br /> |

### getEmergencyServiceCategories

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

```
public List<Integer> getEmergencyServiceCategories ()
```

Returns the emergency service categories of the emergency number. Note: if the emergency number is in `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED`, only `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED` is returned and it means the number is in all categories.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/Integer>` | a list of the emergency service categories. This value cannot be `null`. <br /> |

### getEmergencyUrns

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

```
public List<String> getEmergencyUrns ()
```

Returns the list of emergency Uniform Resources Names (URN) of the emergency number. For example, `urn:service:sos` is the generic URN for contacting emergency services of all type. Reference: 3gpp 24.503, Section 5.1.6.8.1 - General; RFC 5031

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String>` | list of emergency Uniform Resources Names (URN) or an empty list if the emergency number does not have a specified emergency Uniform Resource Name. This value cannot be `null`. <br /> |

### getMnc

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

```
public String getMnc ()
```

Get the Mobile Network Code of the emergency number.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the Mobile Network Code of the emergency number. This value cannot be `null`. <br /> |

### getNumber

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

```
public String getNumber ()
```

Get the dialing number of the emergency number. The character in the number string is only the dial pad character('0'-'9', '\*', '+', or '#'). For example: 911. If the number starts with carrier prefix, the carrier prefix is configured in `https://developer.android.com/reference/android/telephony/CarrierConfigManager#KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the dialing number. This value cannot be `null`. <br /> |

### hashCode

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

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by `https://developer.android.com/reference/java/util/HashMap`.

The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isFromSources

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

```
public boolean isFromSources (int sources)
```

Checks if the emergency number is from the specified emergency number source(s).

<br />

| Parameters ||
|---|---|
| `sources` | `int`: - the supplied emergency number sources. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_NETWORK_SIGNALING` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_SIM` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DATABASE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_MODEM_CONFIG` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_NUMBER_SOURCE_DEFAULT` |

| Returns ||
|---|---|
| `boolean` | `true` if the emergency number is from the specified emergency number source(s); `false` otherwise. <br /> |

### isInEmergencyServiceCategories

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

```
public boolean isInEmergencyServiceCategories (int categories)
```

Checks if the emergency number is in the supplied emergency service category(s).

<br />

| Parameters ||
|---|---|
| `categories` | `int`: - the supplied emergency service categories. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_POLICE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AMBULANCE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_FIRE_BRIGADE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MARINE_GUARD` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MOUNTAIN_RESCUE` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_MIEC` - `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_AIEC` |

| Returns ||
|---|---|
| `boolean` | `true` if the emergency number is in the specified emergency service category(s) or if its emergency service category is `https://developer.android.com/reference/android/telephony/emergency/EmergencyNumber#EMERGENCY_SERVICE_CATEGORY_UNSPECIFIED`; `false` otherwise. <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 29](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` |