public class ProfileReadResponse extends ReadResponse implements ProfileDataCallback, android.os.Parcelable
isValid() can be used to
check if data were parsed successfully. Parsing method must call super methods on
both ReadResponse.onDataReceived(BluetoothDevice, Data) and
onInvalidDataReceived(BluetoothDevice, Data) in order to make getters working properly.
Check out profile data callbacks in the Android BLE Common Library for example of usage.
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<ProfileReadResponse> |
CREATOR |
| Modifier | Constructor and Description |
|---|---|
|
ProfileReadResponse() |
protected |
ProfileReadResponse(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid()
Returns true if
onInvalidDataReceived(BluetoothDevice, Data) wasn't called. |
void |
onInvalidDataReceived(android.bluetooth.BluetoothDevice device,
Data data)
Callback called when the data received do not conform to required scheme.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
describeContents, getBluetoothDevice, getRawData, onDataReceivedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonDataReceivedpublic static final android.os.Parcelable.Creator<ProfileReadResponse> CREATOR
public ProfileReadResponse()
protected ProfileReadResponse(android.os.Parcel in)
public void onInvalidDataReceived(@NonNull
android.bluetooth.BluetoothDevice device,
@NonNull
Data data)
ProfileDataCallbackonInvalidDataReceived in interface ProfileDataCallbackdevice - the target device.data - the data received. If the DataMerger was used, this contains the
merged result.public boolean isValid()
onInvalidDataReceived(BluetoothDevice, Data) wasn't called.public void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.ParcelablewriteToParcel in class ReadResponse