Dmitry Khasanov
12/09/2019, 11:51 AMDominaezzz
12/09/2019, 12:38 PMlaunch(<http://Dispatchers.IO|Dispatchers.IO>) {
while(isActive) {
checkNewFilesInDir();
publishStatus();
delay(200);
}
}
gildor
12/09/2019, 12:42 PMDominaezzz
12/09/2019, 12:43 PMwhile(true)
gildor
12/09/2019, 12:43 PMDominaezzz
12/09/2019, 12:43 PMbezrukov
12/09/2019, 12:49 PMcallbackFlow
Dmitry Khasanov
12/09/2019, 1:05 PMDominaezzz
12/09/2019, 1:08 PMGlobalScope.launch
should work for you. (Assuming you're not on android, which might be done slightly differently).Dmitry Khasanov
12/09/2019, 1:19 PMDominaezzz
12/09/2019, 1:38 PMChannels
or Flow
.Dmitry Khasanov
12/09/2019, 1:42 PMFlow
is something new for me. Thanks to allgildor
12/09/2019, 3:02 PM