android - Difference between FILE_URI and NATIVE_URI in cordova plugin camera -
what different between file_uri , native_uri in cordova plugin camera?
there 3 options, , understand different per platform:
camera.destinationtype.file_uri 'file://' ios 'content://' android camera.destinationtype.native_uri 'assets-library://' ios 'content://' android camera.destinationtype.data_url 'data:image/jpg;base64,'
if want convert them other urls can use file plugin: https://github.com/apache/cordova-plugin-file
navigator.camera.getpicture(function (path) { window.alert('getpicture.success: ' + json.stringify(path)); window.resolvelocalfilesystemuri(path, function (fileentry) { window.alert("success: " + json.stringify(fileentry)); }, function (e) { window.alert("error: " + json.stringify(e)); }); }, function (e) { window.alert('getpicture.error: ' + json.stringify(e)); }, $scope.options);
here documentation options: https://github.com/apache/cordova-plugin-camera/blob/master/www/cameraconstants.js
and link source code function: https://github.com/apache/cordova-plugin-file/blob/master/www/resolvelocalfilesystemuri.js
Comments
Post a Comment