INNER CODE UNIT · Java

onCreate

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

    public void onCreate(Context context, ScanResult result) throws RuntimeException {
        mContext = context;
        mRssi = result.getRssi();
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
            txPower = String.valueOf(result.getTxPower());
        }
        if (result.getScanRecord() != null) {
            txPowerLevel = String.valueOf(result.getScanRecord().getTxPowerLevel());
        }
        mBluetoothManager = (BluetoothManager) context.getSystemService(BLUETOOTH_SERVICE);
        if (mBluetoothManager != null) {
            mBluetoothAdapter = mBluetoothManager.getAdapter();

            // Register for system Bluetooth events
            registerReceiver();
            configureClient(result);
        }
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…