【发布时间】:2011-09-07 06:59:38
【问题描述】:
我正在尝试允许用户从图库中或通过使用相机拍照来选择图像。我试过这个:
Intent imageIntent = new Intent(Intent.ACTION_GET_CONTENT);
imageIntent.setType("image/*");
startActivityForResult(Intent.createChooser(imageIntent, "Select Picture"), GET_IMAGE_REQUEST);
但它会自动显示图库,甚至不提供选择活动的选项。似乎应该有比this question 中给出的解决方案更好的方法来实现这一点。这真的是唯一的方法吗?
【问题讨论】:
标签: android android-intent android-camera android-gallery android-intent-chooser