You should not be using component names like this. There are well- defined Intents for launching and selecting media from the gallery. This is the kind of problems you will face when you use explicit intents. Go for implicit intents instead.
Just a simple trick might work, do not set the component name. And may be set the Mime type as well, if it doesn't work. On Oct 14, 11:02 pm, Freddy <f...@charter.net> wrote: > I've had an app on the market for over a year. Recently customers > have been reporting a crash; all customers have been running Android > 2.1 or 2.2 (note sure if the crash is limited to those platforms tho; > interesting that this does work on the simulator but not physical > devices. Maybe devices renamed the component name of the image > gallery???). The crash occurs when I attempt to lauch the Image > Gallery app. > > Is there a preferred method to launching the Image Gallery? > > I use the following code > > Intent i = new Intent(); > i.setAction(Intent.ACTION_VIEW); > i.setComponent(new ComponentName("com.android.gallery", > "com.android.camera.ImageGallery")); > i.setData(Uri.parse("content://media/internal/images/ > media")); > startActivity(i); > > which runs great on a v2.2 simulator but crashes on v2.2 physical > devices with the exception > > Unable to find explicit activity class {com.android.gallery/ > com.android.camera.ImageGallery}; have you declared this activity in > your AndroidManifest.xml? > > Any tips on how to fix this or a new method to launch the Image > Gallery is appreciated. > > Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en