<#C1CFAFJSK|coroutines> <#CRJCTR5PD|flow> Hello ...
# coroutines
#coroutines #flow Hello everyone I was developing my own app when I realized that when we immediately cancel the coroutine that is responsible for the collection of a StateFlow before the start of the operation, it is no longer possible to repeat the collect operation and the program process must be terminated and then the program execute it to give us the expected behavior, is this behavior correct for the scenario that I have implemented, i.e. we have two Fragments, the first one provides only one button, after which permission is granted from the user's side to the next Fragment, which is responsible for displaying the preview The camera is running. In this case, I go to App Settings and cancel the permission related to the camera. I return to the program and because I specified in the onStart method that if the permission of the camera was not granted, it will perform the popStack operation. I am surprised to see when I click on the grant button and go to the next page, the value of StateFlow is not collected