rss
01/21/2023, 10:01 AMNo virtual method error being received)
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
fun startStreaming(setImage: (ByteArray) -> Unit) {
scope.launch {
while (true) {
try {
// screenStream is an object of DataInputStream class
val jpegImageByteArray = screenStream!!.readAllBytes() //---error-here
withContext(Dispatchers.Main) { setImage(jpegImageByteArray) }
} catch (e: Exception) {...