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 fails in FragmentActivity #349

Description

@naixx

There is a restriction in FragmentActivity.startForResult

if (requestCode != -1 && (requestCode&0xffff0000) != 0) {
    throw new IllegalArgumentException("Can only use lower 16 bits for requestCode");
}

So, ids can not be applied.

Activity

  1. mathieuboniface commented on Oct 22, 2012

    @mathieuboniface
    Contributor

    Wow ! Thank you for the pointer !

    I think we have to change our implementation of @OnActivityResult

    http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html#startActivityForResult(android.content.Intent, int)

  2. pyricau commented on Oct 22, 2012

    @pyricau
    Contributor

    WTF. Oh dear, now we can't even use the R class.. Well, we'll have to fallback to constants then. Shit. I hate it. 😍

  3. pyricau commented on Oct 22, 2012

    @pyricau
    Contributor

    Thanks for pointing out @naixx , sorry for specifically asking for ids..

  4. mathieuboniface commented on Oct 22, 2012

    @mathieuboniface
    Contributor

    I will make this change before the end of this week.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions