Skip to content

StateHandler not invoked #4

@vishalg0wda

Description

@vishalg0wda

StateHandler does not get invoked if defined with primitive datatypes:

@StateHandler(state = STATE_LOCATION_RESOLUTION_REQUIRED)
public void onEventStateLocationResolutionRequired(boolean success, TinyMachine tm) {
    // Code does not flow here.
    if (success) tm.transitionTo(STATE_BINDING_SERVICE);
    else tm.transitionTo(STATE_FAILED_LOCATION_RESOLUTION);
}

...

mTinyMachine.transitionTo(STATE_LOCATION_RESOLUTION_REQUIRED);
mTinyMachine.fireEvent(true);

This is probably not a bug, but I believe it should be mentioned in the docs. Would definitely save someone else the time.

Aside: thank you for this wonderful library! We're using it extensively in our app. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions