native.showPopup("mail", options) crash on Android (Unfortunately, AppName has stopped)

I’m trying to get a copy of a db from a user, so I write this simple code. It’s working just fine on iOS, but on Android it crashes the app and shows a dialog box “Unfortunately, AppName has stopped”.

Any ideas?

Could it be the MIME type? I’ve tried type=“application” and type=“application/octet-stream”, but I’m getting the same result

local emailOptions = {      subject = "FL Debugging",      body = "The file is attached",      isBodyHtml = false,      attachment = {              {baseDir=system.DocumentsDirectory,filename="FL.db", type="application/octet-stream"},                             }, } native.showPopup("mail", emailOptions)  

This does seem to be related to the type declaration. “Application” just crashes the app. I tried “text” - it generates the email attachment, but when the email is received it doesn’t have an attachment - it seems to have been screwed up by the encoding.

I get the impression that Corona is just crashing if I use anything but image or text. Is there a defined list of supported MIME types?

Hi beernathan,

I have a similar problem, but in my case the app even crashes with a text attachment.

I’ve tried type=“text” and type=“text/plain”.

Sending images works just fine.

Have you found a solution?

mfindert

This does seem to be related to the type declaration. “Application” just crashes the app. I tried “text” - it generates the email attachment, but when the email is received it doesn’t have an attachment - it seems to have been screwed up by the encoding.

I get the impression that Corona is just crashing if I use anything but image or text. Is there a defined list of supported MIME types?

Hi beernathan,

I have a similar problem, but in my case the app even crashes with a text attachment.

I’ve tried type=“text” and type=“text/plain”.

Sending images works just fine.

Have you found a solution?

mfindert