I am getting a warning when I try to make a BT connection inside a coroutine.
I've checked this SO post, but it was only abstract theorycrafting and no material code. One of the answers there mentioned that the warning in the title should be dealt in a case-by-case basis, so here is my case. Does anyone know how I can resolve the warning? Thanks!
fun initSocket() = runBlocking {
try {
mSocket = // Assume socket is initialized correctly. Not relevant here
mSocket.connect() // "Inapproprite Blocking Method Call"
mOutputStream = mSocket.outputStream
} catch (e: Exception) {
Log.e(LOG_TAG, "Error establishing Socket Connection...")
}
}