fun init()

in PoC/android/app/src/main/java/com/epam/crowdresitance/bluetooth/gatt/BtGattServer.kt [30:39]


    fun init(context: Context) {
        val bluetoothGattServerCallback =
            BtGattServerCallback()

        val bluetoothManager = context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
        gattServer =
            bluetoothManager.openGattServer(context, bluetoothGattServerCallback)
        bluetoothGattServerCallback.gattServer = gattServer
        startGattService()
    }