I am banging my head against a brick wall with this.
I'm using XF 3.2, XAM plugin 5.2, sending an email with out an attachment is fine.
I have the following code;
var emailSender = CrossMessaging.Current.EmailMessenger; var email = new EmailMessageBuilder() .Subject("xyz") .Body("redacted") .WithAttachment() .Build(); emailSender.SendEmail(email);
Now regardless what I try, local PCL path(string, string) , "content//", i can not get anything other than this Error, when sending the email with attachment.
Java.Lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
when I watch the "email", the Java.io.file is null still.
I think I need to use a dependency service to send the email, and then i could use the native file formats, but i would still need to know the full correct path to lets say assets or resources on both platforms.
It doesn't help that the documentation seems vastly outdated, poorly structured, and assumes a lot of prior knowledge.