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.

IntentBuilder add Support to start from Fragments  #695

@dodgex

Description

@dodgex

Hey,

i just encountered a Problem with the IntentBuilder.

When i try to start(ForResult) an activity from a fragment, i can't use the IntentBuilder as the intentbuilder requires a Context object.

  • if i pass the activity the result is sent to the FragmentActivity and not to the fragment
  • if i pass the aplication contex, i get the message that i need to add Intent.FLAG_ACTIVITY_NEW_TASK what i dont want.

i have to use this code for a successfull start and getting the result in my fragment

Intent intent_ = new Intent(getSherlockActivity().getApplicationContext(), AlarmEditorActivity_.class);
intent_.putExtra("alarmInfo", info);
startActivityForResult(intent_, EDIT_ALARM);

the relevant part is the startActivityForResult call that in the intentbuilder is the FragmentActivity and not the Fragment. :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions