You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am using Android phone and manage to use window.plugins.socialsharing.shareViaEmail to sent email together with the attachment as below:
window.plugins.socialsharing.shareViaEmail(
'Document sent from Testing',
'Test Subject AAA',
['abcd@gmail.com'],
null, // CC: must be null or an array
null, // BCC: must be null or an array
['file:///storage/MicroSD/Download/testAttach.pdf'],
null, null
);
*** if i remove one slash in file:///xxx become file://xxx , the attachemnt will not able to attach in the email.
my problem is when i try to use window.plugins.socialsharing.shareWithOptions as below, the attachment cannot attach into whatapps, only message appear in whatapps. i have try to set the option as
files: pdfBase64String, or
files: 'file:///storage/MicroSD/Download/testAttach.pdf',
the attachment is missing but no error. if i change it to
files: [pdfBase64String], or
files: ['file:///storage/MicroSD/Download/testAttach.pdf'], below error occur:
Sharing failed with message: Attempt to invoke virtual method 'android.....' on a null object reference
var pdfBase64String = 'data:application/pdf;df:myOwnName.pdf;base64,' + 'jkAAABccaj..';
try {
var options = {
message: 'Document sent from Testing',
subject: 'Hi, i am email subject here',
files: pdfBase64String,
chooserTitle: 'Pick an app and share'
}
var onSuccess = function (result) {
}
var onError = function (msg) {
}
window.plugins.socialsharing.shareWithOptions(options, onSuccess, onError);
}
catch (err) {
alert(err.message);
}
Any idea what is the probelm ???
Thanks.
The text was updated successfully, but these errors were encountered:
@WilsonYHChan I've got the same problem using window.plugins.socialsharing.share() method. Did you resolve this? @EddyVerbruggen, can you help us ? Please!! 😅
For some reason, you can't pass message. If you pass message + files parameter, whatsapp ignores the files and share the text msg. This is strange, and I don't know why, but it works!
Hi, i am using Android phone and manage to use window.plugins.socialsharing.shareViaEmail to sent email together with the attachment as below:
window.plugins.socialsharing.shareViaEmail(
'Document sent from Testing',
'Test Subject AAA',
['abcd@gmail.com'],
null, // CC: must be null or an array
null, // BCC: must be null or an array
['file:///storage/MicroSD/Download/testAttach.pdf'],
null, null
);
*** if i remove one slash in file:///xxx become file://xxx , the attachemnt will not able to attach in the email.
my problem is when i try to use window.plugins.socialsharing.shareWithOptions as below, the attachment cannot attach into whatapps, only message appear in whatapps. i have try to set the option as
the attachment is missing but no error. if i change it to
Sharing failed with message: Attempt to invoke virtual method 'android.....' on a null object reference
Any idea what is the probelm ???
Thanks.
The text was updated successfully, but these errors were encountered: