cordova-plugin-intent icon indicating copy to clipboard operation
cordova-plugin-intent copied to clipboard

proper way to use getRealPathFromContentUrl

Open colonna-mike opened this issue 7 years ago • 1 comments

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')
        });
 }
}

colonna-mike avatar Aug 29 '16 14:08 colonna-mike

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.

MBuchalik avatar Aug 30 '16 09:08 MBuchalik