{ "id": "170398", "key": "TIMOB-25541", "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": [ { "id": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-01-19T23:16:27.000+0000", "created": "2017-11-20T22:36:28.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "email", "emaildialog" ], "versions": [ { "id": "19542", "description": "", "name": "Release 6.2.2", "archived": false, "released": true, "releaseDate": "2017-09-19" } ], "issuelinks": [ { "id": "56468", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "171467", "key": "TIMOB-25940", "fields": { "summary": "Android: Email dialog can not attach blob file as an attachment only for android v8.x.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-04-20T21:54:54.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nAs of Titanium 6.2.2, the EmailDialog fails to attach files on Android 7.0 and newer OS versions.\r\n\r\n*Steps to reproduce:*\r\n\r\n# Set up a project using Titanium 6.2.2 or higher.\r\n# Build and run the app on an Android 7.0 or newer device.\r\n# Tap on 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 file1 = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"File1.txt\");\r\n\tfile1.write(\"Hello World!\");\r\n\tvar file2 = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, \"File2.txt\");\r\n\tfile2.write(\"This is a test.\");\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(file1);\r\n\tdialog.addAttachment(file2);\r\n\tdialog.open();\r\n});\r\nwindow.add(button);\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nAn e-mail window gets displayed, but notice that there are no file attachments. This is the bug.\r\n\r\n*Expected Result:*\r\nThere should be 2 files attached to the e-mail, \"File1.txt\" and \"File2.txt\".\r\n\r\n*Work-Around:*\r\nIn Titanium 7.0.0 and higher, you can target API Level 23 in the \"tiapp.xml\" file to work-around this issue.\r\n\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nFor Titanium 6.3.x and 6.2.2, there is no work-around. You must build with Titanium 6.2.1 or older instead.\r\n", "attachment": [], "flagged": false, "summary": "Android: EmailDialog file attachments not working on Android 7 and higher", "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": [ { "id": "431061", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The following PR is a community made fix, but it's a work-in-progress...\r\nhttps://github.com/appcelerator/titanium_mobile/pull/9520\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-20T22:48:26.000+0000", "updated": "2017-11-20T22:48:26.000+0000" }, { "id": "431566", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Work is complete.\r\n\r\nPR (master): https://github.com/appcelerator/titanium_mobile/pull/9520", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-30T22:55:14.000+0000", "updated": "2017-11-30T22:55:14.000+0000" }, { "id": "432885", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (7.0.x): https://github.com/appcelerator/titanium_mobile/pull/9709", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-09T02:26:56.000+0000", "updated": "2018-01-09T02:26:56.000+0000" }, { "id": "432985", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed for master & PR merged.\r\nFR passed for backport , waiting for merge to get enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-10T18:14:12.000+0000", "updated": "2018-01-10T18:14:12.000+0000" }, { "id": "433352", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Master & backport Pr's merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-19T23:16:19.000+0000", "updated": "2018-01-19T23:16:19.000+0000" }, { "id": "433474", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix with SDK 7.1.0.v20180121202754 & 7.0.2.v20180119173957.\r\n\r\nClosing.\r\n\r\nStudio Ver: 5.0.0.201712081732\r\nSDK Ver: 7.0.2.v20180119173957, 7.1.0.v20180121202754\r\nOS Ver: 10.13.2\r\nXcode Ver: Xcode 9.2\r\nAppc NPM: 4.2.11\r\nAppc CLI: 7.0.1\r\nDaemon Ver: 1.0.1\r\nTi CLI Ver: 5.0.14\r\nAlloy Ver: 1.10.10\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 1.8.0_101\r\nDevices: samsung SM-G955U1 --- Android 7.0\r\n google Nexus 5 --- Android 6.0.1\r\n google Pixel --- Android 7.1.1\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-22T18:34:45.000+0000", "updated": "2018-01-22T18:35:05.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }