2011-10-12 44 views

回答

1

当然!您必须参数化启动Gallery应用程序的Intent:将操作设置为Intent.ACTION_PICK。将MIME类型设置为one of the image types或image/*。将数据设置为要显示的文件的Uri。

Intent galleryStarter = new Intent(); 
galleryStarter.setAction(Intent.ACTION_PICK); 
galleryStarter.setType("image/*"); 
galleryStarter.setData(Uri.fromFile(imageFileToShow)); 
context.startActivity(galleryStarter); 
+0

感谢您的回复。但是我收到一个名为ActivityNotFoundException的异常。 在我的应用程序中,我拍了很多照片。那么是否有一系列照片的好方法? – Chinthaka