Skip to content
This repository was archived by the owner on Apr 30, 2019. It is now read-only.
This repository was archived by the owner on Apr 30, 2019. It is now read-only.

Update docs for best place to register the bus #176

@philippeluickx

Description

@philippeluickx

Based on http://stackoverflow.com/questions/19692711/illegalargumentexception-with-otto-event-bus-in-fragment-instance/19737191#19737191

I just lost 3 days and a lot of hair because of a usecase where my subscriber did not get an event. I changed my bus registration from onResume/onPause (which is used e.g. at https://github.com/square/otto/blob/master/otto-sample/src/main/java/com/squareup/otto/sample/LocationHistoryFragment.java#L33) to onStart/onStop and everything works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions