Thanks for writing such a beautiful App to explain Kotin flow. Could you please some resources to write the Android Test for Flow and Coroutines (for ViewModel and Repository layer).
I can’t seem to get any outputs in Android Studio 4.2.1 when I run the main function.
Same problem, hitting play on the main function does nothing.
Only solution I could find is Installing IntelliJ IDEA Community instead.
Open the project in that then I get an error about JDK configuration and click the Use settings JDK. The main.kt file is under src->main->kotlin and now the Play button works.
I have a few questions in understanding Kotlin flows. Please help me clarify these things:
- If we don’t have to send multiple values(in case we only use REST APIs), in that case what is the advantage of using Kotlin flows?
- Is the API used in the app a streaming API?
- If so, how is the data sent from the API whenever there is a change received in the app?
- How do we generally integrate streaming APIs in an android app if we use/don’t use Kotlin flows?