Mark Robinton wrote:
> Hi,
>
> I am trying to call an intent to select someone from the contactlist
> from 2 different places in my program.
>
> In one activity class (my main one) I call:
>
> Intent i=new Intent(Intent.ACTION_PICK,
> Uri.parse("content://contacts/people"));
> startActivityForResult(i, PICK_REQUEST);
>
>
> and I am able to catch the result of PICK_REQUEST in my
> onActivityResult function, no problem.
>
> When I try calling the same intent within another class, it still
> tries to catch it in the
> onActivityResult of the main class, not in the onActivityResult i
> implemented in the 2nd class.
>
> What am I doing wrong so I don't jump out of my other class (where
> there's private data I want to access once I am done getting the
> contact info).
Is the second class an activity? If not, there's your problem.
If the second class is an activity, I would expect the callback to match
where startActivityForResult lies. You're not calling
startActivityForResult in some inner class that gets passed around by
any chance?
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---