INNER CODE UNIT · Java

registerReceiver

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

    private void registerReceiver() {
        IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
        mContext.registerReceiver(mBluetoothReceiver, filter);
    }

    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;
        }
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…