0

lets say there is an android project with module a, b and c all written in java. then I add another module, module d in the project. can I still use coroutine internally in module d?

I know I cannot use it in java module, but does coroutine still work in this project even though specific module that use coroutine was pure kotlin

daya pangestu
  • 400
  • 3
  • 12

1 Answers1

0

You can definitely use coroutines in your kotlin class without any problem. The syntax remains the same as any normal kotlin project.

On top of that, you can even use coroutines in your Java Class by a workaround using this.

Implementing Coroutines in Java

Narendra_Nath
  • 4,578
  • 3
  • 13
  • 31