[TIMOB-23482] Android: EmailDialog fails to attach files when using Outlook
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-01-19T23:15:39.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.0.2 |
Components | Android |
Labels | android, emaildialog, outlook |
Reporter | Martyn Joyce |
Assignee | Joshua Quick |
Created | 2016-06-07T08:50:43.000+0000 |
Updated | 2018-01-22T18:35:57.000+0000 |
Description
I use createEmailDialog to send emails and attach locally created files to them.
On Android the attachment does not get added if the user selects to send the email via Outlook. Everything works correctly if the user selects to send the email via Gmail.
Please see screenshots in attachments
var emailDialog = Ti.UI.createEmailDialog({});
emailDialog.subject = "Test email with attachment";
emailDialog.toRecipients = ["test@me.com"];
emailDialog.messageBody = 'the file should be attached';
var file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, "test.txt");
emailDialog.addAttachment(file);
emailDialog.open();
Attachments
File | Date | Size |
---|---|---|
gmail.png | 2016-06-07T08:48:41.000+0000 | 95128 |
outlook.png | 2016-06-07T08:48:41.000+0000 | 84102 |
Hello, I am able to reproduce this issue with given code and given step. *Steps:* 1. Create a default classic project for android with following code.
2. Paste test.txt file in resources folder. 3. Build and run the app on android device. Result : On Android the attachment does not get added if the user selects to send the email via Outlook. Everything works correctly if the user selects to send the email via Gmail. Note: To test this issue Gamil and Outlook app must be installed in the device *Environment*: *Device info:* HTC One (Android 4.4.3) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.3.0.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0
Based on what's happening, it looks like the Outlook application is not handling the receiving of the attachment. I believe there is nothing wrong with it. (I can be wrong but I'm leaning towards that Outlook is not handling the attachment correct). Another way to do this is to use Intents. http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.Intent
ok, thanks for looking into it
[~martz256] Please let us know if there's any updates you want to give.
I've confirmed that the fix for [TIMOB-25541] fixes this issue as well... PR (master): https://github.com/appcelerator/titanium_mobile/pull/9520
PR (7.0.x): https://github.com/appcelerator/titanium_mobile/pull/9709
FR passed for master & PR merged. FR passed for backport , waiting for merge to get enabled.
Master & backport PR's merged.
Verified the fix with SDK 7.1.0.v20180121202754 & 7.0.2.v20180119173957. Closing. Studio Ver: 5.0.0.201712081732 SDK Ver: 7.0.2.v20180119173957, 7.1.0.v20180121202754 OS Ver: 10.13.2 Xcode Ver: Xcode 9.2 Appc NPM: 4.2.11 Appc CLI: 7.0.1 Daemon Ver: 1.0.1 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.10 Node Ver: 8.9.1 NPM Ver: 5.5.1 Java Ver: 1.8.0_101 Devices: samsung SM-G955U1 — Android 7.0 google Nexus 5 — Android 6.0.1 google Pixel — Android 7.1.1