-
public class RxBleGattCallback
-
-
Field Summary
Fields Modifier and Type Field Description private final BluetoothGattCallbackbluetoothGattCallback
-
Constructor Summary
Constructors Constructor Description RxBleGattCallback(Scheduler callbackScheduler, BluetoothGattProvider bluetoothGattProvider, DisconnectionRouter disconnectionRouter, NativeCallbackDispatcher nativeCallbackDispatcher)
-
Method Summary
-
-
Constructor Detail
-
RxBleGattCallback
RxBleGattCallback(Scheduler callbackScheduler, BluetoothGattProvider bluetoothGattProvider, DisconnectionRouter disconnectionRouter, NativeCallbackDispatcher nativeCallbackDispatcher)
-
-
Method Detail
-
getBluetoothGattCallback
BluetoothGattCallback getBluetoothGattCallback()
-
observeDisconnect
<T> Observable<T> observeDisconnect()
-
getOnConnectionStateChange
Observable<RxBleConnection.RxBleConnectionState> getOnConnectionStateChange()
-
getOnServicesDiscovered
Observable<RxBleDeviceServices> getOnServicesDiscovered()
-
getOnMtuChanged
Observable<Integer> getOnMtuChanged()
-
getOnCharacteristicRead
Observable<ByteAssociation<UUID>> getOnCharacteristicRead()
-
getOnCharacteristicWrite
Observable<ByteAssociation<UUID>> getOnCharacteristicWrite()
-
getOnCharacteristicChanged
Observable<CharacteristicChangedEvent> getOnCharacteristicChanged()
-
getOnDescriptorRead
Observable<ByteAssociation<BluetoothGattDescriptor>> getOnDescriptorRead()
-
getOnDescriptorWrite
Observable<ByteAssociation<BluetoothGattDescriptor>> getOnDescriptorWrite()
-
getOnRssiRead
Observable<Integer> getOnRssiRead()
-
getConnectionParametersUpdates
Observable<ConnectionParameters> getConnectionParametersUpdates()
-
setNativeCallback
void setNativeCallback(BluetoothGattCallback callback)
A native callback allows to omit RxJava's abstraction on the BluetoothGattCallback.It's intended to be used only with a com.polidea.rxandroidble2.RxBleCustomOperation in a performancecritical implementations. If you don't know if your operation is performance critical it's likely that you shouldn't use this APIand stick with the RxJava.
The callback reference will be automatically released after the operation is terminated. The main drawback of this API is thatwe can't assure you the thread on which it will be executed. Please keep this in mind as the system may execute it on a main thread.
- Parameters:
callback- the object to be called
-
setHiddenNativeCallback
void setHiddenNativeCallback(HiddenBluetoothGattCallback callbackHidden)
setNativeCallback Since Android 8.0 (API 26) BluetoothGattCallback has some hidden method(s). Setting this HiddenBluetoothGattCallback willrelay calls to those hidden methods.On API lower than 26 this method does nothing
- Parameters:
callbackHidden- the object to be called
-
-
-
-