-
-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Description
override suspend fun getDevicesInLan(ipAddress: String): Flow<DeviceData> =
callbackFlow {
val subNetDevices = SubnetDevices.fromLocalAddress()
.findDevices(object : SubnetDevices.OnSubnetDeviceFound {
override fun onDeviceFound(device: Device?) {
}
override fun onFinished(devicesFound: java.util.ArrayList<Device>?) {
}
})
awaitClose { subNetDevices.cancel() }
}
I got the error when running this code and it conveys me
java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Enumeration.hasMoreElements()' on a null object reference
this one.
Metadata
Metadata
Assignees
Labels
No labels