Question: I need to find objects from `ArrayList<Object>` with similar `object.trackingId`.

For example:

```
ArrayList<Ilist> ilistArray = new ArrayList<>();
ilistArray.addAll(...); // array is filled with Ilist objects

```

```
class Ilist {
    String name;   
    String trackingId;
    String place;
    // Et cetera
}

```

I need to find the those object from `ilistArray` which has similar trackingId.

Answer: 
The problem is, that coroutines are built to only **suspend** and not block a thread. This means, that multiple coroutines can run on the same thread. When using blocking methods, they block the whole thread and will probably prevent other coroutines from running. So, it usually is bad practice to do this.

Since you obviously need to call these methods, use a dispatcher that tries to create a new thread for every coroutine, like `Dispatchers.IO` (which is designed for those operations, see the [documentation](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-i-o.html)). To do so, just wrap the blocking calls with `withContext`.

```
withContext(Dispatchers.IO) { 
   // your blocking calls 
}

```

I hope I could help!
To get rid of the warning try to use next code inside `DownloadInfoClass`:

```
private fun downloadMethod(urls: String) = CoroutineScope(Main).launch {
    url = URL(urls)
    val result = download() // suspends a coroutines launched using Main Context
    Log.i("Result: ", result)
}

private suspend fun download() = withContext(IO) { // download on background thread
    try {
        httpURLConnection = url.openConnection() as HttpURLConnection
        inputStream = httpURLConnection.inputStream
        inputStreamReader = InputStreamReader(inputStream)

        var data: Int = inputStreamReader.read()
        while (data != -1) {
            val current: Char = data.toChar()
            result += current
            data = inputStreamReader.read()
        }
        result // return result if there are no Exceptions
    } catch (e: Exception) {
        e.printStackTrace()
    }
    "" // return empty String if there is an Exception
}

```