{ "id": "174999", "key": "TIMOB-27889", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-08-11T11:08:25.000+0000", "created": "2020-05-08T17:36:29.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity", "shortcut" ], "versions": [], "issuelinks": [ { "id": "58358", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "172989", "key": "TIMOB-26818", "fields": { "summary": "iOS: Move application shortcut under Ti.UI.Shortcut to have parity", "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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "58562", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "175199", "key": "TIMOB-27990", "fields": { "summary": "Android: Ti.UI.ShortcutItem has lot of issues", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-08-11T11:08:25.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": " iOS has Ti.UI.iOS.ApplicationShortcuts and android has implemented Ti.UI.ShortcutItem for shortcut. To have parity on both platform , it is discussed to move Shortcut APIs under Ti.UI.Shortcut. Following are the decided APIs -\r\n\r\n\r\n{code:java}\r\n1. var shortcutItem = Ti.UI.createShortcutItem({\r\n id: String // Unique identifier\r\n title: String\r\n description: String\r\n icon: String/Number\r\n data: Dictionary\r\n })\r\n\r\n2. var shortcut = Ti.UI.createShortcut();\r\n\r\n3. shortcut.add(Ti.UI.ShortcutItem);\r\n\r\n4. shortcut.items -> Array\r\n\r\n5. shortcut.getById(id) -> Ti.UI.ShortcutItem\r\n\r\n6. shortcut.staticItems -> Array\r\n\r\n7. shortcut.remove(Ti.UI.ShortcutItem);\r\n\r\n8. shortcut.removeAll();\r\n\r\n9. Event listener - Ti.UI.Shortcuts.addEventListener('click', listener); -> Ti.UI.ShortcutItem\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Implement Ti.UI.Shortcut", "creator": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1196, "state": "closed", "name": "2020 Sprint 11", "startDate": "2020-05-26T15:56:00.000Z", "endDate": "2020-06-05T15:56:00.000Z", "completeDate": "2020-06-08T21:05:50.356Z", "originBoardId": 114 }, { "id": 1198, "state": "closed", "name": "2020 Sprint 12", "startDate": "2020-06-08T21:06:41.849Z", "endDate": "2020-06-19T21:06:00.000Z", "completeDate": "2020-06-19T15:54:38.493Z", "originBoardId": 114 }, { "id": 1199, "state": "closed", "name": "2020 Sprint 13", "startDate": "2020-06-19T16:41:04.099Z", "endDate": "2020-07-02T16:41:00.000Z", "completeDate": "2020-07-02T15:37:12.455Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "455662", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/11759", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-08T00:00:43.000+0000", "updated": "2020-06-08T00:00:43.000+0000" }, { "id": "456009", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-07T00:59:14.000+0000", "updated": "2020-07-07T00:59:14.000+0000" }, { "id": "456248", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Parity issue with eventListner.\r\n\r\n//Works on iOS\r\n//Does not work on android. On android it works with Ti.UI.Shortcut.addEventListner\r\nvar shortcut = Ti.UI.createShortcut();\r\nShortcut.addEventListener('click', e => {\r\n// e should contain 'item' property\r\nconsole.log('shortcut: ' + JSON.stringify(e, null, 1))\r\n});", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-27T21:31:54.000+0000", "updated": "2020-07-27T21:33:00.000+0000" }, { "id": "456261", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "9_1_X: https://github.com/appcelerator/titanium_mobile/pull/11853", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-28T23:34:40.000+0000", "updated": "2020-07-28T23:34:40.000+0000" }, { "id": "456264", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Gary's PR will make it work like iOS.\r\n\r\nHowever... I don't think the {{Ti.UI.createShortcut(}}} method should exist on Android or iOS since it doesn't make sense to have multiple instances of it.\r\n{code:javascript}\r\nvar shortcut = Ti.UI.createShortcut();\r\nvar item = Ti.UI.createShortcutItem();\r\nshortcut.add(item);\r\n{code}\r\n\r\nWe should be using it as a module like this...\r\n{code:javascript}\r\nvar item = Ti.UI.createShortcutItem();\r\nTi.UI.Shortcut.add(item);\r\n{code}\r\n\r\n...and possible have shortcut item creation done via the {{Ti.UI.Shortcut}} module...\r\n{code:javascript}\r\nvar item = Ti.UI.Shortcut.createShortcutItem();\r\nTi.UI.Shortcut.add(item);\r\n{code}\r\n\r\nI apologize for not paying attention to the original design, but we might want to re-open this for both Android and iOS.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-29T02:01:52.000+0000", "updated": "2020-07-29T02:03:23.000+0000" }, { "id": "456398", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Improvement verified in SDK version {{9.1.0.v20200810120239}}, {{9.2.0.v20200810085310}} and {{9.3.0.v20200810090511}}. \r\n\r\n*Test and other information can be found at:*\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11856\r\n\r\n*Test Environment*\r\n{code:java}\r\nMacOS Big Sur: 11.0 Beta\r\nXcode: 12.0 Beta \r\nJava Version: 1.8.0_242\r\nAndroid NDK: 21.3.6528147\r\nNode.js: 12.18.1\r\n\"\"NPM\":\"5.0.0\",\"CLI\":\"8.1.0-master.5\"\"\r\nAPI29 Pixel XL emulator\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-11T11:08:16.000+0000", "updated": "2020-08-11T11:08:16.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }