Retrieved from Cordova (Ver.5.2.0) via cordova-plugin-camera
I would like to get the image/jpeg EXIF information.
When I googled, I found "cordova-exif", loaded JS, and
The implementation is as follows.
navigator.camera.getPicture(onSuccess, onFail, options);
function onSuccess (imageURI) {
CordovaExif.readData(imageURI, function(exifObject){
alert(exifObject);
});
}
"Also, the following settings were set to ""config.xml"" before the iOS 8 verification."
<preference name="CameraUsesGeolocation" value="true"/>
After checking the operation of the simulator and the actual machine in the above condition, the alert dialog is
I won't show it, maybe because of the presence or absence of EXIF information, I have EXIF information.
I also checked the jpeg file, but it still didn't work.
Do you need any new settings?
If you know how to solve this problem, please let me know.
Let me check a little.
Do you import sources?
<script type="text/javascript" src="cordova-exif.js"></script>
Have you installed the plug-in that Cordova Exif requires??
cordova plugin add org.apache.cordova.camera
cordova plugin add org.apache.cordova.file
onSuccess
Is the method itself not invoked?
(OnFail...)
function onSuccess(imageURI){
console.log("funconSuccess"; // Log
CordovaExif.readData(imageURI, function(exifObject){
alert(exifObject);
});
}
navigator.camera.getPicture(onSuccess, onFail, options);
If you use JavaScript alert() in the callback function, you may experience problems.
https://docs.monaca.io/ja/reference/cordova_3.5/camera/
© 2024 OneMinuteCode. All rights reserved.