*bump*
Mark Murphy wrote:
> I'm attempting to use ACTION_PICK_ACTIVITY. According to the docs:
>
> "Pick an activity given an intent, returning the class selected."
>
> So, I've used ACTION_PICK to pick a contact, which I get back in my
> onActivityResult() as an Intent.
>
> What I can't quite figure out is how to construct the
> ACTION_PICK_ACTIVITY Intent. Again, according to the docs:
>
> "Input: getExtra(String) field EXTRA_INTENT is an Intent used with
> queryIntentActivities(Intent, int) to determine the set of activities
> from which to pick."
>
> If I'm reading this correctly, I need two Intents:
>
> 1. One containing the Uri of the content for which I want the user to
> pick an activity
>
> 2. One containing the Intent from #1 above as EXTRA_INTENT and having an
> action of ACTION_PICK_ACTIVITY
>
> It's a bit mystifying why I need two rather than just one (I don't need
> EXTRA_INTENT on ACTION_PICK, so why on ACTION_PICK_ACTIVITY?). But, be
> that as it may, no matter what I try, Android 0.9 says it can't find an
> activity to handle my ACTION_PICK_ACTIVITY request, and so blows up with
> an exception like:
>
> android.content.ActivityNotFoundException: No Activity found to handle
> Intent { action=android.intent.action.PICK_ACTIVITY (has extras) }
>
> Part of the problem may be that the docs *don't* say what the Uri is
> supposed to be for Intent #2. I have tried the same Uri as in Intent #1,
> and I have tried no Uri, and both have failed:
>
> Intent i=new Intent()
> //.setData(data.getData())
> .putExtra(Intent.EXTRA_INTENT, data)
> .setAction(Intent.ACTION_PICK_ACTIVITY);
>
> where data is the Intent I got back from ACTION_PICK.
>
> Any idea where I'm going wrong?
>
> Thanks!
--
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.1 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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---