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

# BluetoothGattCharacteristic

*** ** * ** ***

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


`
public


class
BluetoothGattCharacteristic
`


`

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.bluetooth.BluetoothGattCharacteristic |

<br />

*** ** * ** ***

Represents a Bluetooth GATT Characteristic

A GATT characteristic is a basic data element used to construct a GATT service, `https://developer.android.com/reference/android/bluetooth/BluetoothGattService`. The characteristic contains a value as well as additional information and
optional GATT descriptors, `https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_FLOAT` Characteristic value format type float (32-bit float) |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_SFLOAT` Characteristic value format type sfloat (16-bit float) |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_SINT16` Characteristic value format type sint16 |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_SINT32` Characteristic value format type sint32 |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_SINT8` Characteristic value format type sint8 |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_UINT16` Characteristic value format type uint16 |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_UINT32` Characteristic value format type uint32 |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_UINT8` Characteristic value format type uint8 |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_READ` Characteristic read permission |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_READ_ENCRYPTED` Characteristic permission: Allow encrypted read operations |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_READ_ENCRYPTED_MITM` Characteristic permission: Allow reading with person-in-the-middle protection |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_WRITE` Characteristic write permission |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_WRITE_ENCRYPTED` Characteristic permission: Allow encrypted writes |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_WRITE_ENCRYPTED_MITM` Characteristic permission: Allow encrypted writes with person-in-the-middle protection |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_WRITE_SIGNED` Characteristic permission: Allow signed write operations |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PERMISSION_WRITE_SIGNED_MITM` Characteristic permission: Allow signed write operations with person-in-the-middle protection |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_BROADCAST` Characteristic property: Characteristic is broadcastable. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_EXTENDED_PROPS` Characteristic property: Characteristic has extended properties |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_INDICATE` Characteristic property: Characteristic supports indication |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_NOTIFY` Characteristic property: Characteristic supports notification |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_READ` Characteristic property: Characteristic is readable. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_SIGNED_WRITE` Characteristic property: Characteristic supports write with signature |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_WRITE` Characteristic property: Characteristic can be written. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#PROPERTY_WRITE_NO_RESPONSE` Characteristic property: Characteristic can be written without response. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_DEFAULT` Write characteristic, requesting acknowledgement by the remote device |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_NO_RESPONSE` Write characteristic without requiring a response by the remote device |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_SIGNED` Write characteristic including authentication signature |

| ### 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/bluetooth/BluetoothGattCharacteristic>` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#CREATOR` |
| ` protected https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor>` | `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#mDescriptors` List of descriptors included in this characteristic. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#BluetoothGattCharacteristic(java.util.UUID,%20int,%20int)(https://developer.android.com/reference/java/util/UUID uuid, int properties, int permissions) ` Create a new BluetoothGattCharacteristic. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#addDescriptor(android.bluetooth.BluetoothGattDescriptor)(https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor descriptor) ` Adds a descriptor to this characteristic. |
| ` int` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getDescriptor(java.util.UUID)(https://developer.android.com/reference/java/util/UUID uuid) ` Returns a descriptor with a given UUID out of the list of descriptors for this characteristic. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor>` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getDescriptors()() ` Returns a list of descriptors for this characteristic. |
| ` https://developer.android.com/reference/java/lang/Float` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getFloatValue(int,%20int)(int formatType, int offset) ` *This method was deprecated in API level 33. Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to get the characteristic value* |
| ` int` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getInstanceId()() ` Returns the instance ID for this characteristic. |
| ` https://developer.android.com/reference/java/lang/Integer` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getIntValue(int,%20int)(int formatType, int offset) ` *This method was deprecated in API level 33. Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to get the characteristic value* |
| ` int` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getPermissions()() ` Returns the permissions for this characteristic. |
| ` int` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getProperties()() ` Returns the properties of this characteristic. |
| ` https://developer.android.com/reference/android/bluetooth/BluetoothGattService` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getService()() ` Returns the service this characteristic belongs to. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getStringValue(int)(int offset) ` *This method was deprecated in API level 33. Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to get the characteristic value* |
| ` https://developer.android.com/reference/java/util/UUID` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getUuid()() ` Returns the UUID of this characteristic |
| ` byte[]` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getValue()() ` *This method was deprecated in API level 33. Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` instead* |
| ` int` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getWriteType()() ` Gets the write type for this characteristic. |
| ` boolean` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(java.lang.String)(https://developer.android.com/reference/java/lang/String value) ` *This method was deprecated in API level 33. Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`* |
| ` boolean` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(int,%20int,%20int)(int value, int formatType, int offset) ` *This method was deprecated in API level 33. Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`* |
| ` boolean` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(byte[])(byte[] value) ` *This method was deprecated in API level 33. Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`* |
| ` boolean` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(int,%20int,%20int,%20int)(int mantissa, int exponent, int formatType, int offset) ` *This method was deprecated in API level 33. Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`* |
| ` void` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setWriteType(int)(int writeType) ` Set the write type for this characteristic Setting the write type of a characteristic determines how the `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)` function write this characteristic. |
| ` void` | ` https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel out, 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

### FORMAT_FLOAT

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

```
public static final int FORMAT_FLOAT
```

Characteristic value format type float (32-bit float)

<br />

Constant Value:

52
(0x00000034)


### FORMAT_SFLOAT

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

```
public static final int FORMAT_SFLOAT
```

Characteristic value format type sfloat (16-bit float)

<br />

Constant Value:

50
(0x00000032)


### FORMAT_SINT16

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

```
public static final int FORMAT_SINT16
```

Characteristic value format type sint16

<br />

Constant Value:

34
(0x00000022)


### FORMAT_SINT32

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

```
public static final int FORMAT_SINT32
```

Characteristic value format type sint32

<br />

Constant Value:

36
(0x00000024)


### FORMAT_SINT8

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

```
public static final int FORMAT_SINT8
```

Characteristic value format type sint8

<br />

Constant Value:

33
(0x00000021)


### FORMAT_UINT16

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

```
public static final int FORMAT_UINT16
```

Characteristic value format type uint16

<br />

Constant Value:

18
(0x00000012)


### FORMAT_UINT32

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

```
public static final int FORMAT_UINT32
```

Characteristic value format type uint32

<br />

Constant Value:

20
(0x00000014)


### FORMAT_UINT8

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

```
public static final int FORMAT_UINT8
```

Characteristic value format type uint8

<br />

Constant Value:

17
(0x00000011)


### PERMISSION_READ

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

```
public static final int PERMISSION_READ
```

Characteristic read permission

<br />

Constant Value:

1
(0x00000001)


### PERMISSION_READ_ENCRYPTED

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

```
public static final int PERMISSION_READ_ENCRYPTED
```

Characteristic permission: Allow encrypted read operations

<br />

Constant Value:

2
(0x00000002)


### PERMISSION_READ_ENCRYPTED_MITM

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

```
public static final int PERMISSION_READ_ENCRYPTED_MITM
```

Characteristic permission: Allow reading with person-in-the-middle protection

<br />

Constant Value:

4
(0x00000004)


### PERMISSION_WRITE

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

```
public static final int PERMISSION_WRITE
```

Characteristic write permission

<br />

Constant Value:

16
(0x00000010)


### PERMISSION_WRITE_ENCRYPTED

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

```
public static final int PERMISSION_WRITE_ENCRYPTED
```

Characteristic permission: Allow encrypted writes

<br />

Constant Value:

32
(0x00000020)


### PERMISSION_WRITE_ENCRYPTED_MITM

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

```
public static final int PERMISSION_WRITE_ENCRYPTED_MITM
```

Characteristic permission: Allow encrypted writes with person-in-the-middle protection

<br />

Constant Value:

64
(0x00000040)


### PERMISSION_WRITE_SIGNED

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

```
public static final int PERMISSION_WRITE_SIGNED
```

Characteristic permission: Allow signed write operations

<br />

Constant Value:

128
(0x00000080)


### PERMISSION_WRITE_SIGNED_MITM

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

```
public static final int PERMISSION_WRITE_SIGNED_MITM
```

Characteristic permission: Allow signed write operations with person-in-the-middle protection

<br />

Constant Value:

256
(0x00000100)


### PROPERTY_BROADCAST

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

```
public static final int PROPERTY_BROADCAST
```

Characteristic property: Characteristic is broadcastable.

<br />

Constant Value:

1
(0x00000001)


### PROPERTY_EXTENDED_PROPS

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

```
public static final int PROPERTY_EXTENDED_PROPS
```

Characteristic property: Characteristic has extended properties

<br />

Constant Value:

128
(0x00000080)


### PROPERTY_INDICATE

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

```
public static final int PROPERTY_INDICATE
```

Characteristic property: Characteristic supports indication

<br />

Constant Value:

32
(0x00000020)


### PROPERTY_NOTIFY

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

```
public static final int PROPERTY_NOTIFY
```

Characteristic property: Characteristic supports notification

<br />

Constant Value:

16
(0x00000010)


### PROPERTY_READ

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

```
public static final int PROPERTY_READ
```

Characteristic property: Characteristic is readable.

<br />

Constant Value:

2
(0x00000002)


### PROPERTY_SIGNED_WRITE

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

```
public static final int PROPERTY_SIGNED_WRITE
```

Characteristic property: Characteristic supports write with signature

<br />

Constant Value:

64
(0x00000040)


### PROPERTY_WRITE

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

```
public static final int PROPERTY_WRITE
```

Characteristic property: Characteristic can be written.

<br />

Constant Value:

8
(0x00000008)


### PROPERTY_WRITE_NO_RESPONSE

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

```
public static final int PROPERTY_WRITE_NO_RESPONSE
```

Characteristic property: Characteristic can be written without response.

<br />

Constant Value:

4
(0x00000004)


### WRITE_TYPE_DEFAULT

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

```
public static final int WRITE_TYPE_DEFAULT
```

Write characteristic, requesting acknowledgement by the remote device

<br />

Constant Value:

2
(0x00000002)


### WRITE_TYPE_NO_RESPONSE

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

```
public static final int WRITE_TYPE_NO_RESPONSE
```

Write characteristic without requiring a response by the remote device

<br />

Constant Value:

1
(0x00000001)


### WRITE_TYPE_SIGNED

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

```
public static final int WRITE_TYPE_SIGNED
```

Write characteristic including authentication signature

<br />

Constant Value:

4
(0x00000004)


## Fields

### CREATOR

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

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

<br />

<br />

### mDescriptors

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

```
protected List<BluetoothGattDescriptor> mDescriptors
```

List of descriptors included in this characteristic.

<br />

## Public constructors

### BluetoothGattCharacteristic

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

```
public BluetoothGattCharacteristic (UUID uuid, 
                int properties, 
                int permissions)
```

Create a new BluetoothGattCharacteristic.

<br />

| Parameters ||
|---|---|
| `uuid` | `UUID`: The UUID for this characteristic <br /> |
| `properties` | `int`: Properties of this characteristic <br /> |
| `permissions` | `int`: Permissions for this characteristic <br /> |

## Public methods

### addDescriptor

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

```
public boolean addDescriptor (BluetoothGattDescriptor descriptor)
```

Adds a descriptor to this characteristic.

<br />

| Parameters ||
|---|---|
| `descriptor` | `BluetoothGattDescriptor`: Descriptor to be added to this characteristic. <br /> |

| Returns ||
|---|---|
| `boolean` | true, if the descriptor was added to the characteristic <br /> |

### describeContents

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

### getDescriptor

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

```
public BluetoothGattDescriptor getDescriptor (UUID uuid)
```

Returns a descriptor with a given UUID out of the list of descriptors for this
characteristic.

<br />

| Parameters ||
|---|---|
| `uuid` | `UUID` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor` | GATT descriptor object or null if no descriptor with the given UUID was found. <br /> |

### getDescriptors

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

```
public List<BluetoothGattDescriptor> getDescriptors ()
```

Returns a list of descriptors for this characteristic.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/bluetooth/BluetoothGattDescriptor>` | Descriptors for this characteristic <br /> |

### getFloatValue

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

```
public Float getFloatValue (int formatType, 
                int offset)
```


**This method was deprecated
in API level 33.**   

Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to get
the characteristic value

Return the stored value of this characteristic.

See `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getValue()` for details.

<br />

| Parameters ||
|---|---|
| `formatType` | `int`: The format type used to interpret the characteristic value. <br /> |
| `offset` | `int`: Offset at which the float value can be found. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Float` | Cached value of the characteristic at a given offset or null if the requested offset exceeds the value size. <br /> |

### getInstanceId

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

```
public int getInstanceId ()
```

Returns the instance ID for this characteristic.

If a remote device offers multiple characteristics with the same UUID, the instance ID is
used to distinguish between characteristics.

<br />

| Returns ||
|---|---|
| `int` | Instance ID of this characteristic <br /> |

### getIntValue

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

```
public Integer getIntValue (int formatType, 
                int offset)
```


**This method was deprecated
in API level 33.**   

Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to get
the characteristic value

Return the stored value of this characteristic.

The formatType parameter determines how the characteristic value is to be interpreted. For
example, setting formatType to `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#FORMAT_UINT16` specifies that the first two bytes of
the characteristic value at the given offset are interpreted to generate the return value.

<br />

| Parameters ||
|---|---|
| `formatType` | `int`: The format type used to interpret the characteristic value. <br /> |
| `offset` | `int`: Offset at which the integer value can be found. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Integer` | Cached value of the characteristic or null of offset exceeds value size. <br /> |

### getPermissions

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

```
public int getPermissions ()
```

Returns the permissions for this characteristic.

<br />

| Returns ||
|---|---|
| `int` | Permissions of this characteristic <br /> |

### getProperties

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

```
public int getProperties ()
```

Returns the properties of this characteristic.

The properties contain a bit mask of property flags indicating the features of this
characteristic.

<br />

| Returns ||
|---|---|
| `int` | Properties of this characteristic <br /> |

### getService

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

```
public BluetoothGattService getService ()
```

Returns the service this characteristic belongs to.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/bluetooth/BluetoothGattService` | The associated service <br /> |

### getStringValue

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

```
public String getStringValue (int offset)
```


**This method was deprecated
in API level 33.**   

Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to get
the characteristic value

Return the stored value of this characteristic.

See `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#getValue()` for details.

<br />

| Parameters ||
|---|---|
| `offset` | `int`: Offset at which the string value can be found. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | Cached value of the characteristic <br /> |

### getUuid

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

```
public UUID getUuid ()
```

Returns the UUID of this characteristic

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/UUID` | UUID of this characteristic <br /> |

### getValue

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

```
public byte[] getValue ()
```


**This method was deprecated
in API level 33.**   

Use `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` instead

Get the stored value for this characteristic.

This function returns the stored value for this characteristic as retrieved by calling
`https://developer.android.com/reference/android/bluetooth/BluetoothGatt#readCharacteristic(android.bluetooth.BluetoothGattCharacteristic)`. The cached value of the characteristic is updated
as a result of a read characteristic operation or if a characteristic update notification has
been received.

<br />

| Returns ||
|---|---|
| `byte[]` | Cached value of the characteristic <br /> |

### getWriteType

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

```
public int getWriteType ()
```

Gets the write type for this characteristic.

<br />

| Returns ||
|---|---|
| `int` | Write type for this characteristic. Value is one of the following: - `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_DEFAULT` - `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_NO_RESPONSE` - `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_SIGNED` |

### setValue

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

```
public boolean setValue (String value)
```


**This method was deprecated
in API level 33.**   

Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`

Set the locally stored value of this characteristic.

See `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(byte[])` for details.

<br />

| Parameters ||
|---|---|
| `value` | `String`: New value for this characteristic <br /> |

| Returns ||
|---|---|
| `boolean` | true if the locally stored value has been set <br /> |

### setValue

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

```
public boolean setValue (int value, 
                int formatType, 
                int offset)
```


**This method was deprecated
in API level 33.**   

Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`

Set the locally stored value of this characteristic.

See `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(byte[])` for details.

<br />

| Parameters ||
|---|---|
| `value` | `int`: New value for this characteristic <br /> |
| `formatType` | `int`: Integer format type used to transform the value parameter <br /> |
| `offset` | `int`: Offset at which the value should be placed <br /> |

| Returns ||
|---|---|
| `boolean` | true if the locally stored value has been set <br /> |

### setValue

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

```
public boolean setValue (byte[] value)
```


**This method was deprecated
in API level 33.**   

Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`

Updates the locally stored value of this characteristic.

This function modifies the locally stored cached value of this characteristic. To send the
value to the remote device, call `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic)` to send the value
to the remote device.

<br />

| Parameters ||
|---|---|
| `value` | `byte`: New value for this characteristic <br /> |

| Returns ||
|---|---|
| `boolean` | true if the locally stored value has been set, false if the requested value could not be stored locally. <br /> |

### setValue

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

```
public boolean setValue (int mantissa, 
                int exponent, 
                int formatType, 
                int offset)
```


**This method was deprecated
in API level 33.**   

Pass the characteristic value directly into `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)`

Set the locally stored value of this characteristic.

See `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#setValue(byte[])` for details.

<br />

| Parameters ||
|---|---|
| `mantissa` | `int`: Mantissa for this characteristic <br /> |
| `exponent` | `int`: exponent value for this characteristic <br /> |
| `formatType` | `int`: Float format type used to transform the value parameter <br /> |
| `offset` | `int`: Offset at which the value should be placed <br /> |

| Returns ||
|---|---|
| `boolean` | true if the locally stored value has been set <br /> |

### setWriteType

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

```
public void setWriteType (int writeType)
```

Set the write type for this characteristic

Setting the write type of a characteristic determines how the `https://developer.android.com/reference/android/bluetooth/BluetoothGatt#writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic,%20byte[],%20int)` function write
this characteristic.

<br />

| Parameters ||
|---|---|
| `writeType` | `int`: The write type to for this characteristic. Value is one of the following: - `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_DEFAULT` - `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_NO_RESPONSE` - `https://developer.android.com/reference/android/bluetooth/BluetoothGattCharacteristic#WRITE_TYPE_SIGNED` |

### writeToParcel

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

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

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `out` | `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` |