You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
@Receiver never called with OnAttachOnDetach + local #1132
LocalBroadcastManager can't register the IntentFilter because the IntentFilter.addAction() called in onCreate AFTER onAttach (where the filter added to the manager). The filter is empty when AA try to register the action in manager. Therefore the action won't be registered.
@westito why do you need the registration in onAttach? wouldn't onCreate or start/resume be enough?
@WonderCsabo any idea? we could check if an IntentFilter/@Receiver should be registred in onAttach and then setup the filter there. but this could bring issues to the caching if we are not carefull, as we currently only care about the actions and dataSchemes.
actually i would suggest to consider removing the onAttach registration options. first it is only available to Fragments and second onCreate is called right after onAttach so there shouldn't be any issues with registration after create instead of attach.
@yDelouis is the author of this feature, so i think he should decide. Personally, I would not drop OnAttachOnDetach since it is already implemented, only if fixing this is too hard.
LocalBroadcastManager can't register the IntentFilter because the IntentFilter.addAction() called in onCreate AFTER onAttach (where the filter added to the manager). The filter is empty when AA try to register the action in manager. Therefore the action won't be registered.