codelab-kotlin-coroutines
codelab-kotlin-coroutines copied to clipboard
Kotlin Coroutines codelab
When explaining the `combine()` operator, in the middle of the paragraph, the sentence: > That means that while Room starts the network request, Retrofit can start the network query. Should...
In the 9th section "Coroutines in Room & Retrofit" the paragraph about adding Coroutines to Retrofit says: > If you still wanted to provide access to retrofit's full `Result`, you...
moved instrumentation tests from test to androidTest and unit tests from androidTest to test
While running the first test for MainViewModelTest.kt my test failed every time until I modified the code from codelab myself. code provided in codelab ```kotlin @Test fun whenMainClicked_updatesTaps() { subject.onMainViewClicked()...
``` try { val lastLocation = fusedLocationClient.awaitLastLocation(); // process lastLocation here if needed showLocation(R.id.textView, lastLocation) } (e: Exception) { // we can do regular exception handling here or let it...
In the final version of [PlantListViewModel](https://github.com/googlecodelabs/kotlin-coroutines/blob/master/advanced-coroutines-codelab/finished_code/src/main/java/com/example/android/advancedcoroutines/PlantListViewModel.kt#L106), `mapLatest` is used to trigger repository updates whenever the filter is toggled; this was hard for me to understand at first as I expected...