Ad
How To Get Deffered From DAO?
I want to get Kotlin Coroutnies Deffered from DAO
@Query("select * from gameprocess where cabinId = :cabinId ")
fun getAllGameProccesBiCabin(cabinId :Int) : Deferred<GameProcess>
but it does not compile (room does not know how to handle Deffered), but I need to use 'wait' from 'Deffered' how can do this?
as another option I could use extension function from this post but, dont know how to integrate it into dao:
https://codelabs.developers.google.com/codelabs/kotlin-coroutines/index.html?index=..%2F..index#6
Ad
Answer
here is dependency which allows me to use async{}.await
https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/coroutines-guide-ui.md
The problem was that I was using old version which doesn't support it.
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad