cordova-plugin-intent
cordova-plugin-intent copied to clipboard
proper way to use getRealPathFromContentUrl
whats the proper way of calling this method? I'm trying to use it like but I'm getting the error saying the getRealpathFromContentUrl() is not a function?
window.plugins.intent.getCordovaIntent(function (intent) {
for (var i = 0, l = intent.clipItems.length; i < l; i++) {
var obj = intent.clipItems[i];
window.plugins.intent.getRealPathFromContentUrl(obj.uri, function (realPath) {
console.log(realPath);
},function () {
alert('error in getRealPathFromContentUrl')
});
}
}
Which version of this plugin are you using? As far as I can see, the latest release (v0.1.31) was on 29 February. Commit 61a47ae8c28a62004eeff4ed96a6f3c64c271a16 was made a few days after this release so I guess that might be the reason why you cannot use this function. I have built an application simply using the master branch and it worked!
Just a side note, maybe it will help someone: I am building using PGB. Here, you can also reference single commits using its hash. This will make sure that further changes in this plugin won't break my application.