Back to project page android-sdk.
The source code is released under:
MIT License
If you think the Android project android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package io.relayr.ble.service; /*from w ww . java2 s .c o m*/ import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothGatt; import io.relayr.ble.BleDevice; import rx.Observable; import rx.functions.Func1; /** * A class representing the service associated with the CONNECTED_TO_MASTER_MODULE mode * @See {@link io.relayr.ble.BleDeviceMode} */ public class MasterModuleService extends BaseService { protected MasterModuleService(BleDevice device, BluetoothGatt gatt, BluetoothGattReceiver receiver) { super(device, gatt, receiver); } public static Observable<MasterModuleService> connect(final BleDevice bleDevice, final BluetoothDevice device) { final BluetoothGattReceiver receiver = new BluetoothGattReceiver(); return doConnect(device, receiver, false) .map(new Func1<BluetoothGatt, MasterModuleService>() { @Override public MasterModuleService call(BluetoothGatt gatt) { return new MasterModuleService(bleDevice, gatt, receiver); } }); } }