# Barcode.Phone

public static class **Barcode.Phone** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Phone number info.

### Nested Class Summary

|---|---|---|---|
| @interface | [Barcode.Phone.FormatType](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.FormatType.md.txt) || Phone number format type constants. |

### Constant Summary

|---|---|---|
| int | [TYPE_FAX](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#TYPE_FAX) | Fax machine. |
| int | [TYPE_HOME](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#TYPE_HOME) | Home phone. |
| int | [TYPE_MOBILE](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#TYPE_MOBILE) | Mobile phone. |
| int | [TYPE_UNKNOWN](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#TYPE_UNKNOWN) | Unknown phone type. |
| int | [TYPE_WORK](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#TYPE_WORK) | Work phone. |

### Public Method Summary

|---|---|
| [String](https://developer.android.com/reference/java/lang/String.html) | [getNumber](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#getNumber())() Gets phone number. |
| int | [getType](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/common/Barcode.Phone.md.txt#getType())() Gets type of the phone number. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Constants

#### public static final int
**TYPE_FAX**

Fax machine.
Constant Value: 3

#### public static final int
**TYPE_HOME**

Home phone.
Constant Value: 2

#### public static final int
**TYPE_MOBILE**

Mobile phone.
Constant Value: 4

#### public static final int
**TYPE_UNKNOWN**

Unknown phone type.
Constant Value: 0

#### public static final int
**TYPE_WORK**

Work phone.
Constant Value: 1

## Public Methods

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getNumber** ()

Gets phone number.

Returns `null` if not available.

#### public int **getType** ()

Gets type of the phone number.

See also `
Barcode.Phone.FormatType`.