I’m trying to make the Nordic Android BLE Library ...
# android
t
I’m trying to make the Nordic Android BLE Library (https://github.com/NordicSemiconductor/Android-BLE-Library) work inside of my Kotlin Android project. I’m not a hard core Java nuances guru guy, so I’m trying to understand what my options are in adapting to this code with Kotlin. The basic recipe seems to be to subclass the BleManager object and then declare a protected inner class, which I’ve done with the following expression:
Copy code
class BLEConduit(context:Context):BleManager<BleManagerCallbacks>(context) {
    ...
    protected inner class CallbackFoo:BleManagerGattCallback() {
        ...
    }
}
My question is, do I have to do it with an inner class? What if wanted to have a “pluggable” GattCallback thing that used closures to localize the behavior? My guess is no, because of the way this class/type is declared:
protected abstract class BleManagerGattCallback extends BleManagerHandler {
// All methods defined in the super class.
}