Suspend function ‘callGetApi’ should be called only from a coroutine or another suspend function

Suspend function should be called only from a coroutine. That means to call a suspend function you need to use a coroutine builder, e.g. launch, async or runBlocking(recommended to use only in unit tests). For example: class Activity : AppCompatActivity(), CoroutineScope { private var job: Job = Job() override val coroutineContext: CoroutineContext get() = Dispatchers.Main … Read more