I don't need to start up one image, what I need to start up is the
gallery application. I'm not wanting to choose one image or return an
image back to my application.  I just want the gallery app to start up
just like you clicked the icon.

I do have some good news that I have figured out a way to actually
start it up, but not only do I have to use class names, I have also
check if it is a Hero or a non-Hero.
This line starts up the Gallery app on a non Hero phone (could be
different once the Acer A1 or Sony X10 comes out):
intent.setClassName("com.android.camera",
"com.android.camera.GalleryPicker");
This line starts up the Gallery app on a Hero phone:
intent.setClassName("com.htc.album",
"com.htc.album.AlbumTabSwitchActivity");

I've poached a method i found on another forum that lets me check
which activity will work with this:
 List<ResolveInfo> list = context.getPackageManager
().queryIntentActivities(intent,
            PackageManager.MATCH_DEFAULT_ONLY);

With this I now have a way for my users to start up the native gallery
app from my application.  This has been asked a tremendous amount by
my users and I'm excited to deliver it to them.  We both know that
hard coding class names in is not the best method but if there is no
other alternative, then that is just how it must be for now.

On Nov 26, 7:59 pm, Dianne Hackborn <[email protected]> wrote:
> It doesn't even work today, because different devices have the "gallery"
> implemented in different places.  DO NOT USE PACKAGE NAMES.  The only
> supported way to launch other applications is through the officially
> published intent protocols, such as VIEW with an image to show an image.
>
>

-- 
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

Reply via email to