Does anyone know how I can share a document using Cordova? a document that I have on my cell phone (whether temporary or not). I would like to send (other than the link) but the document itself.
Does anyone know how I can share a document using Cordova? a document that I have on my cell phone (whether temporary or not). I would like to send (other than the link) but the document itself.
I solved my problem using the SocialSharing plugin
var options = {
files: ['arquivo.png'],
chooserTitle: 'APP'
}
var onSuccess = function(result) {
console.log("Share completed? " + result.completed); // On Android apps mostly return false even while it's true
console.log("Shared to app: " + result.app); // On Android result.app is currently empty. On iOS it's empty when sharing is cancelled (result.completed=false)
}
var onError = function(msg) {
console.log("Sharing failed with message: " + msg);
}
window.plugins.socialsharing.shareWithOptions(options, onSuccess, onError);