How do I fix the deprecation warning in this code? Alternatively, are there any other options for doing this?
runOnUiThread {
doAsync {
// room insert query
}
}
// anko Commons
implementation "org.jetbrains.anko:anko-commons:0.10.8"
As they say on their deprecation page on github, there are more alternatives. As for commons they provide two libs, all the links are here, keep in mind that some of these libs can be deprecated since last update of that page was 2 years ago.