Ravi Sankar
Ravi Sankar

Reputation: 31

cordova plugin camera not showing gallery on iPad capacitor

Platform:

Ionic

Requirement:

Gallery popover is not visible when upload is clicked on iPad after capacitor migration. It works on iPhone devices.

Used Plugin: Cordova plugin camera

Version of cordova plugin camera:

cordova-plugin-camera: 4.1.0

ionic-native/camera: 4.7.0

Explanation:

We have migrated our ionic application to capacitor. Before migration, cordova plugin camera shows gallery option on both iPhone and iPad. Once it is migrated to capacitor, it shows gallery option only on iPhone. But it is not showing gallery popover on iPad. There is no difference in code level. On both devices, it hits the same method. But on iPad, it doesn't show the gallery popover.

Code:

var option = CameraPopoverOptions(300, 300, 200, 200, Camera.PopoverArrowDirection.ARROW_ANY); this.camera.getPicture({ quality: 100, destinationType: this.camera.DestinationType.FILE_URI, sourceType: this.camera.PictureSourceType.SAVEDPHOTOALBUM, mediaType: this.camera.MediaType.VIDEO, popoverOptions: option }).then((imageData) => { });

I have also tried multiple combinations on cameraoptions.Nothing works on iPad.

No error logs found. App doesn't get crashed. The getPicture method behaves same as iPhone. But gallery popover is not visible in iPad.

Upvotes: 2

Views: 290

Answers (0)

Related Questions