stateFlow
Used to monitor the condition of the cleaner.
Example:
// Get the some cleaner through the cleaner manager
val cleaner = CleanerManagerFactory.cleanerManager.getCleaner(CleanerType.DOWNLOAD)
// Subscribe to the states of the download cleaner
cleaner.stateFlow.collect { cleanerState -> // cleanerState: CleanerState
// Do something...
}Content copied to clipboard