martiin93 opened a new issue #778:
URL: https://github.com/apache/cordova-plugin-camera/issues/778
# Bug Report
## Problem
Using PICTURE_SOURCE_TYPE_SAVED_PHOTO_ALBUM as source on IOS 15 does not
return any callback even though you have selected the image.
### What is expected to happen?
The image url should be returned.
### What does actually happen?
Nothing. The image selector is closed and no callback is triggered.
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
### Command or Code
private void getImageFromSource() {
final PhoneGap phoneGap = GWT.create(PhoneGap.class);
PictureOptions options = new PictureOptions(100);
options.setDestinationType(PictureOptions.DESTINATION_TYPE_FILE_URI);
options.setEncoding(PictureOptions.CAMERA_ENCODING_TYPE_JPEG);
int sourceType = imageSource == Source.CAMERA ?
PictureOptions.PICTURE_SOURCE_TYPE_CAMERA
: PictureOptions.PICTURE_SOURCE_TYPE_SAVED_PHOTO_ALBUM;
options.setSourceType(sourceType);
options.setQuality(IMAGE_QUALITY_SETTING);
if (sourceType == PictureOptions.PICTURE_SOURCE_TYPE_CAMERA) {
options.setAllowEdit(false);
}
phoneGap.getCamera().getPicture(options, new PictureCallback() {
@Override
public void onSuccess(String data) {
display.setFilename(data);
if (sourceType ==
PictureOptions.PICTURE_SOURCE_TYPE_SAVED_PHOTO_ALBUM
&&
phoneGap.getDevice().getPlatform().toLowerCase().equals("android")
&& data.contains("content://")) {
if (verifyFilepathPlugin()) {
resolvedNativePath = "";
resolveNativePath(data);
}
}
}
@Override
public void onFailure(String message) {
if (!message.equals("no image selected")) {
StatusLogger.failedWhileImporting(CONST.image());
}
}
});
}
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
Phone: iPhone X
OS: iOS 15.1
### Version information
Cordova 10.0.0
cordova-plugin-camera 6.0.0 "Camera"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-file-transfer 2.0.0-dev "File Transfer"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-filepath 1.6.0 "cordova-plugin-filepath"
cordova-plugin-wkwebview-file-xhr 3.0.0 "Cordova WKWebView File XHR Plugin"
cordova-plugin-wkwebviewxhrfix 1.0.0 "Cordova WKWebView File XHR Fix"
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]