-
- All Implemented Interfaces:
-
android.os.Parcelable,no.nordicsemi.android.ble.callback.DataReceivedCallback
public class ReadResponse implements DataReceivedCallback, Parcelable
Generic read response class that returns the data received and the device from which data were read. Overriding class must call super on onDataReceived in order to make getters work properly.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<ReadResponse>CREATOR
-
Constructor Summary
Constructors Constructor Description ReadResponse()
-
Method Summary
Modifier and Type Method Description voidonDataReceived(@NonNull() BluetoothDevice device, @NonNull() Data data)Callback received each time the value was read or has changed usingnotifications or indications. BluetoothDevicegetBluetoothDevice()DatagetRawData()voidwriteToParcel(Parcel dest, int flags)intdescribeContents()-
-
Method Detail
-
onDataReceived
void onDataReceived(@NonNull() BluetoothDevice device, @NonNull() Data data)
Callback received each time the value was read or has changed usingnotifications or indications.
- Parameters:
device- the target device.data- the data received.
-
getBluetoothDevice
@Nullable() BluetoothDevice getBluetoothDevice()
-
getRawData
@Nullable() Data getRawData()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
describeContents
int describeContents()
-
-
-
-