我正在使用此代码从图库中获取图像。
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select File"), REQUEST_IMAGE_CAPTURE_GALLERY);
答案 0 :(得分:0)
尝试一下:
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
startActivityForResult(intent, IMAGE_CODE);
IMAGE_CODE是恒定的int值