INNER CODE UNIT · Java

startClient

nic-delhi/AarogyaSetu_Android · app/src/main/java/nic/goi/aarogyasetu/GattClient.java:192

    private void startClient() {
        if (mDevice != null) {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                mBluetoothGatt = mDevice.connectGatt(mContext, false, mGattCallback, TRANSPORT_LE);
            } else {
                mBluetoothGatt = mDevice.connectGatt(mContext, false, mGattCallback);
            }
        }

        if (mBluetoothGatt == null) {
            return;
        }
    }

    private void stopClient() {
        if (mBluetoothGatt != null) {
            mBluetoothGatt.close();
            mBluetoothGatt = null;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…