Mail on Android - Attachment not ok

Corona does not have an API for fetching all of the files within a directory. There’s no way to do this at the moment, at least that I’m aware of. [import]uid: 32256 topic_id: 19798 reply_id: 89671[/import]

I’m trying to send an email with image attachment on Nook. I get a message in the email popup that says “File too large to attach”. The image is small, under 200x200 pixels. The email can be sent but the image is not attached. The same code works fine on iOS devices but fails on an actual Nook. I’m using daily build 2012.904. Any guidance would be appreciated.

EDIT: Just confirmed the image attachments can be sent via email on a vanilla Android Galaxy Tab, so the problem seems to be confined to Nook (haven’t tested on Kindle Fire yet). I hope there is a fix since my client’s primary platform is Nook and being able to send an image via email is one of the major features of the app we are developing with them. [import]uid: 9422 topic_id: 19798 reply_id: 123352[/import]

Stephen,

I just tested this on my Nook Color now. I’ve confirmed this to be a bug. The Nook’s mail app is requesting the MIME type from the Corona app *after* we’ve sent the file to it. That’s the first time I’ve seen a mail app do that. There is currently no work-around. We’ll have to make code changes on our to resolve this.

Have you already submitted a bug report about this? If so, then can you give me the bug number please? If not, I’ll write one up. Thanks. [import]uid: 32256 topic_id: 19798 reply_id: 123430[/import]

Hi Joshua,

Thanks for taking a look at this. I just filed bug report case #17261.

[import]uid: 9422 topic_id: 19798 reply_id: 123436[/import]

Hi Joshua,

I saw you just submitted a fix for Nook tablet in the latest daily build. Amazing response and quick turn around!

Unfortunately I see from the bug log you weren’t able to fix the problem on Nook Color, which is the device that I see the error on. You mention in the log that you’re not sure Nook Color supports attachments on email. I can confirm that it does since I have recently used an app on the Color that opens an mail popup and allows for very large image attachments that do, in fact get sent with the email.

So, I’m not sure what the other bug was that you fixed since I don’t have access to a Nook Tablet, but I’m currently still getting the same error, “File too large to attach” on a Nook Color using the daily build 2012.905

I hope you can please take another look.

Thanks again for your quick (sorrry :wink: attention to this one!

-Stephen [import]uid: 9422 topic_id: 19798 reply_id: 123502[/import]

Hi Stephen,

Yeah, you just happened to have caught me while I was implementing something else on Nook. So, it was just very good timing on your part. :slight_smile:

What I fixed was in regards to the attachments MIME type. I discovered that the mail app was requesting the file’s MIME type from the Corona app via interprocess communications. I resolved that, but then it kept complaining about the file being too big afterwards, which of course it wasn’t.

You said another app that you have was capable of sending an attachment on the Nook Color. Did it use the standard mail app on the Nook Color to send the e-mail? Or did it send the e-mail in the background? [import]uid: 32256 topic_id: 19798 reply_id: 123568[/import]

And just to let you know, I’m contacting Barnes & Noble’s tech-support group about this to help expedite this matter. [import]uid: 32256 topic_id: 19798 reply_id: 123574[/import]

Hi Joshua,

The other app pops up the standard email app on the Nook Color. It looks exactly the same as the one popped up by my Corona app, except is has a section after the subject showing the file name of the image attachment, with a little paper clip, and a garbage can button to remove the attachment. [import]uid: 9422 topic_id: 19798 reply_id: 123576[/import]

I’m trying to send an email with image attachment on Nook. I get a message in the email popup that says “File too large to attach”. The image is small, under 200x200 pixels. The email can be sent but the image is not attached. The same code works fine on iOS devices but fails on an actual Nook. I’m using daily build 2012.904. Any guidance would be appreciated.

EDIT: Just confirmed the image attachments can be sent via email on a vanilla Android Galaxy Tab, so the problem seems to be confined to Nook (haven’t tested on Kindle Fire yet). I hope there is a fix since my client’s primary platform is Nook and being able to send an image via email is one of the major features of the app we are developing with them. [import]uid: 9422 topic_id: 19798 reply_id: 123352[/import]

Stephen,

I just tested this on my Nook Color now. I’ve confirmed this to be a bug. The Nook’s mail app is requesting the MIME type from the Corona app *after* we’ve sent the file to it. That’s the first time I’ve seen a mail app do that. There is currently no work-around. We’ll have to make code changes on our to resolve this.

Have you already submitted a bug report about this? If so, then can you give me the bug number please? If not, I’ll write one up. Thanks. [import]uid: 32256 topic_id: 19798 reply_id: 123430[/import]

Hi Joshua,

Thanks for taking a look at this. I just filed bug report case #17261.

[import]uid: 9422 topic_id: 19798 reply_id: 123436[/import]

Hi Joshua,

I saw you just submitted a fix for Nook tablet in the latest daily build. Amazing response and quick turn around!

Unfortunately I see from the bug log you weren’t able to fix the problem on Nook Color, which is the device that I see the error on. You mention in the log that you’re not sure Nook Color supports attachments on email. I can confirm that it does since I have recently used an app on the Color that opens an mail popup and allows for very large image attachments that do, in fact get sent with the email.

So, I’m not sure what the other bug was that you fixed since I don’t have access to a Nook Tablet, but I’m currently still getting the same error, “File too large to attach” on a Nook Color using the daily build 2012.905

I hope you can please take another look.

Thanks again for your quick (sorrry :wink: attention to this one!

-Stephen [import]uid: 9422 topic_id: 19798 reply_id: 123502[/import]

Hi Stephen,

Yeah, you just happened to have caught me while I was implementing something else on Nook. So, it was just very good timing on your part. :slight_smile:

What I fixed was in regards to the attachments MIME type. I discovered that the mail app was requesting the file’s MIME type from the Corona app via interprocess communications. I resolved that, but then it kept complaining about the file being too big afterwards, which of course it wasn’t.

You said another app that you have was capable of sending an attachment on the Nook Color. Did it use the standard mail app on the Nook Color to send the e-mail? Or did it send the e-mail in the background? [import]uid: 32256 topic_id: 19798 reply_id: 123568[/import]

And just to let you know, I’m contacting Barnes & Noble’s tech-support group about this to help expedite this matter. [import]uid: 32256 topic_id: 19798 reply_id: 123574[/import]

Hi Joshua,

The other app pops up the standard email app on the Nook Color. It looks exactly the same as the one popped up by my Corona app, except is has a section after the subject showing the file name of the image attachment, with a little paper clip, and a garbage can button to remove the attachment. [import]uid: 9422 topic_id: 19798 reply_id: 123576[/import]

Hi Joshua,

Did you ever hear back from B&N re: Nook Color supporting image attachments to email? I’m still getting the “image too large to attach” message when I try send an email with image attached with build 922.

[import]uid: 9422 topic_id: 19798 reply_id: 125384[/import]

Hi Stephen,

Sorry to leave you hanging. Yes, I did get a response from B&N, but not a solution. It’s looking like the Nook’s mail app requires file attachments to be copied to external storage (aka: SD card) first. This is a different behavior compared to other mail apps where they allow direct file access via Android’s ContentProvider classes, which is how Corona does it. We want to avoid copying files to external storage because it can be a major performance hit and needlessly wastes storage space. Especially for large files. The next step for us is to work with B&N and experiment with alternative solutions. We just haven’t had the time to do that yet.

I’m back in feature development mode this week. So, there aren’t going to be any Android bug fixes this week. We’ll be going back to bug fixing mode next week. I’ll let you know then when we’ll be able to look into this. In fact, feel free to post me a reminder next week just in case. Sorry about the delay. We’ve just got a lot to do here. But we definitely consider this a high priority bug. [import]uid: 32256 topic_id: 19798 reply_id: 125468[/import]

Hi Joshua,

Thanks for the detailed response (even though it’s not the answer I was hoping for). I will definitely ping you again next week.

Since you’re in feature development mode maybe this could be a good opportunity to add external/SD storage access for Android to Corona. That could possibly solve this issue and provide a new feature I know a few others have asked about.

Ok, I won’t push my luck anymore :wink:

EDIT: I just realized the other app that does support image attachments on Nook Color must not rely on an SD card, since my Nook Color doesn’t have an SD slot. It lets the user select images from the device’s image gallery/photo library. So maybe what I really need is the ability to save a display group as an image to the gallery ( since display.captureScreen allows saving to the photo album already maybe this is trivial?) and then the ability to attach an image from the gallery to an email (currently not possible, and searching for a particularly named image in the gallery is also not possible with Corona as far as I can tell). No SD card required.

[import]uid: 9422 topic_id: 19798 reply_id: 125487[/import]

Regarding external storage SD card support, we haven’t received a lot of requests for this until the past 2 weeks (that I’m aware of). If more people request this, then that will definitely raise the priority of that feature and get it on our roadmap.

Currently, we’re focusing on highly requested features that you see on our roadmap today (please see the link below). The Android feature that we are working on this week is local/scheduled notifications… which will lay the foundation for push notifications.
http://www.coronalabs.com/resources/roadmap/

Also, “external storage” on Android isn’t always external. It can be a separate “volume” on the same internal storage device, which is how it works on Nook. What makes “external storage” valuable in the Android world is that it’s a public place to keep files that are accessible to all applications, much like how the “My Documents” directory works on Windows. In fact, this is typically how photos are passed between a camera app and a 3rd party app… or a 3rd party app passing a photo to the Gallery app. It’s a massively abused volume used to pass files between apps. We’re trying our best not to do the same with Corona.

I still can’t think of a work-around. Like you said, there’s currently no way to fetch the path to an external file, such as from the gallery. Hmm… [import]uid: 32256 topic_id: 19798 reply_id: 125498[/import]

Hi Joshua,

Did you ever hear back from B&N re: Nook Color supporting image attachments to email? I’m still getting the “image too large to attach” message when I try send an email with image attached with build 922.

[import]uid: 9422 topic_id: 19798 reply_id: 125384[/import]