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

Closed

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. :(

Activity

  1. yDelouis commented on Aug 16, 2013

    @yDelouis
    Contributor

    This is the same as issue #541 and the PR #680 tries to fix this.
    So I think this issue should be closed.

  2. dodgex commented on Aug 16, 2013

    @dodgex
    MemberAuthor

    yeah, looks good! :)

    i seems i didn't look good enough, sorry for the duplicated report!

    looking forward for a merge :)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions