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.

@OnActivityResult to process Intent extras #796

@tobias-

Description

@tobias-

When receiving a reply back via @OnActivityResult it would be great if you could annotate the result with @Result or something similar and get the variables as the response. E.g.:

@OnActivityResult(OtherActivity.REQUEST_CODE)
void response(int resultCode, @Result(OtherActivity.ID) String id) {
...
}

This is an improvement on #28.

Another solution would be for the IntentBuilder to have get-methods for retrieving the value out of the intent with the correct type. E.g.:

@OnActivityResult(OtherActivity.REQUEST_CODE)
void response(int resultCode, Intent resultIntent) {
String id = OtherActivity_.IntentBuilder.create(resultIntent).getId();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions