Skip to content

Commit d70746a

Browse files
committed
* 'master' of https://github.com/dooully/plugins: [image_picker] Resolved the problem that data of onActivityResult is null when selecting Explorer->Gallery in Android # Conflicts: # packages/image_picker/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
2 parents cbe6449 + bc63c4f commit d70746a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/image_picker/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ private void launchTakeVideoWithCameraIntent() {
292292
grantUriPermissions(intent, videoUri);
293293

294294
try {
295-
activity.startActivityForResult(intent, REQUEST_CODE_TAKE_VIDEO_WITH_CAMERA);
295+
activity.startActivityForResult(Intent.createChooser(intent, null), REQUEST_CODE_TAKE_VIDEO_WITH_CAMERA);
296296
} catch (ActivityNotFoundException e) {
297297
try {
298298
// If we can't delete the file again here, there's not really anything we can do about it.
@@ -327,7 +327,7 @@ private void launchPickImageFromGalleryIntent() {
327327
Intent pickImageIntent = new Intent(Intent.ACTION_GET_CONTENT);
328328
pickImageIntent.setType("image/*");
329329

330-
activity.startActivityForResult(pickImageIntent, REQUEST_CODE_CHOOSE_IMAGE_FROM_GALLERY);
330+
activity.startActivityForResult(Intent.createChooser(pickImageIntent, null), REQUEST_CODE_CHOOSE_IMAGE_FROM_GALLERY);
331331
}
332332

333333
private void launchMultiPickImageFromGalleryIntent() {
@@ -337,7 +337,7 @@ private void launchMultiPickImageFromGalleryIntent() {
337337
}
338338
pickImageIntent.setType("image/*");
339339

340-
activity.startActivityForResult(pickImageIntent, REQUEST_CODE_CHOOSE_MULTI_IMAGE_FROM_GALLERY);
340+
activity.startActivityForResult(Intent.createChooser(pickImageIntent, null), REQUEST_CODE_CHOOSE_MULTI_IMAGE_FROM_GALLERY);
341341
}
342342

343343
public void takeImageWithCamera(MethodCall methodCall, MethodChannel.Result result) {

0 commit comments

Comments
 (0)