public class BLEPeripheral
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
io.reactivex.Observable<java.lang.Boolean> |
close() |
io.reactivex.Observable<java.lang.Integer> |
connect() |
static BLEPeripheral |
create(android.content.Context context,
android.bluetooth.BluetoothDevice device) |
io.reactivex.Observable<DispatchGattCallback.ConnectionStateChangeEvent> |
disconnect() |
static BLEPeripheral |
fromAddress(android.content.Context context,
java.lang.String address) |
android.bluetooth.BluetoothAdapter |
getBluetoothAdatper() |
android.bluetooth.BluetoothDevice |
getBluetoothDevice() |
int |
getConnectionPriority() |
int |
getConnectionState() |
io.reactivex.Observable<DispatchGattCallback.ConnectionStateChangeEvent> |
getConnectionState$() |
android.content.Context |
getContext() |
android.bluetooth.BluetoothGatt |
getGatt() |
io.reactivex.Observable<com.iotize.android.communication.protocol.ble.rx.DispatchGattCallback.EventPayload> |
getGattErrors$() |
io.reactivex.Observable<com.iotize.android.communication.protocol.ble.rx.DispatchGattCallback.EventPayload> |
getGattEvents$() |
java.util.List<android.bluetooth.BluetoothGattService> |
getGattServices()
Get gatt service discovered if already done or start a service discovery
|
Lwm2mService |
getLwm2mService() |
UpgradeService |
getUpgradeService() |
boolean |
isConnected() |
io.reactivex.Observable<java.lang.Object> |
ready()
Complete when peripheral is ready to communicate
|
io.reactivex.Observable<java.lang.Integer> |
reset() |
void |
setConnectionPriority(int connectionPriority) |
io.reactivex.Observable<android.bluetooth.BluetoothGattDescriptor> |
setupNotifications() |
io.reactivex.Observable<java.lang.Object> |
setupServices() |
public static BLEPeripheral create(@NonNull android.content.Context context, @NonNull android.bluetooth.BluetoothDevice device) throws AdapterNotAvailableException, ManagerNotAvailableException
AdapterNotAvailableException
ManagerNotAvailableException
public static BLEPeripheral fromAddress(@NonNull android.content.Context context, @NonNull java.lang.String address) throws AdapterNotAvailableException, ManagerNotAvailableException
AdapterNotAvailableException
ManagerNotAvailableException
public int getConnectionPriority()
public void setConnectionPriority(int connectionPriority)
public io.reactivex.Observable<java.lang.Integer> reset()
public io.reactivex.Observable<java.lang.Integer> connect()
public io.reactivex.Observable<java.lang.Object> ready()
public io.reactivex.Observable<java.lang.Object> setupServices()
public java.util.List<android.bluetooth.BluetoothGattService> getGattServices()
public io.reactivex.Observable<android.bluetooth.BluetoothGattDescriptor> setupNotifications()
public io.reactivex.Observable<DispatchGattCallback.ConnectionStateChangeEvent> disconnect()
public io.reactivex.Observable<java.lang.Boolean> close()
@NonNull public android.bluetooth.BluetoothDevice getBluetoothDevice()
@NonNull public android.bluetooth.BluetoothGatt getGatt()
public int getConnectionState()
@Nullable public UpgradeService getUpgradeService()
@Nullable public Lwm2mService getLwm2mService()
public android.bluetooth.BluetoothAdapter getBluetoothAdatper()
public android.content.Context getContext()
public boolean isConnected()
@NonNull public io.reactivex.Observable<com.iotize.android.communication.protocol.ble.rx.DispatchGattCallback.EventPayload> getGattEvents$()
@NonNull public io.reactivex.Observable<com.iotize.android.communication.protocol.ble.rx.DispatchGattCallback.EventPayload> getGattErrors$()
@NonNull public io.reactivex.Observable<DispatchGattCallback.ConnectionStateChangeEvent> getConnectionState$()