Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@Receiver never called with OnAttachOnDetach + local #1132

Description

@westito

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.

Activity

  1. dodgex commented on Sep 10, 2014

    @dodgex
    Member

    @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.

  2. WonderCsabo commented on Sep 10, 2014

    @WonderCsabo
    Member

    @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.

  3. WonderCsabo commented on Nov 8, 2014

    @WonderCsabo
    Member

    @westito @dodgex can one of you guys look into the fix for this?

  4. dodgex commented on Nov 10, 2014

    @dodgex
    Member

    currently i don't have much time as i'm busy with my own project. i'll try to take a look at this as soon as the update i'm working on is done.

  5. WonderCsabo commented on Dec 23, 2014

    @WonderCsabo
    Member

    Any news on this one?

  6. dodgex commented on Dec 23, 2014

    @dodgex
    Member

    yeah, sorry for the delay. totaly forgot this one. :(

  7. WonderCsabo commented on Mar 22, 2015

    @WonderCsabo
    Member

    Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions