{ "id": "170484", "key": "TIMOB-25568", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2017-11-29T03:21:02.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "blob", "email", "emaildialog", "engSchedule" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-06-18T15:35:30.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nWhen adding multiple blobs as attachments to an EmailDialog, only the last blob gets attached to the e-mail. And the last blob attached is duplicated in the e-mail for every previous blob attachment attempted to be added.\r\n\r\n*Steps to Reproduce:*\r\n# Set up an Android device with a working mail app.\r\n# Build and run the below code on that device.\r\n# Tap the \"Send E-Mail\" button.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow();\r\nvar button = Ti.UI.createButton({ title: \"Send E-Mail\" });\r\nbutton.addEventListener(\"click\", function(e) {\r\n\tvar dialog = Ti.UI.createEmailDialog();\r\n\tdialog.subject = \"E-Mail Test\";\r\n\tdialog.toRecipients = [\"john.doe@domain.com\", \"jane.doe@domain.com\"];\r\n\tdialog.messageBody = \"This is the e-mail's body.\\nThis is the second line.\";\r\n\tdialog.addAttachment(window.toImage());\r\n\tdialog.addAttachment(button.toImage());\r\n\tdialog.open();\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nThe e-mail draft shows 2 image file attachments that are exactly the same when it shouldn't. They should be different images.\r\n\r\n*Expected Result:*\r\nThe e-mail draft should have 2 image file attachments.\r\n* Screenshot of the entire Titanium app window.\r\n* Screenshot of just the \"Send E-Mail\" button.\r\n\r\n*Work-Around:*\r\nWrite the blobs to file and attach the files instead.\r\n\r\n*Reason it Fails:*\r\nTitanium's \"EmailDialogProxy\" Java class writes all blobs to a temp file with the same file name, \"attachment\". So, each blob added overwrites the previous one in the temp directory.\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/EmailDialogProxy.java#L217\r\n", "attachment": [], "flagged": false, "summary": "Android: EmailDialog fails to attach more than 1 blob", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }