{ "id": "92357", "key": "TIMOB-9263", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13407", "description": "Sprint 2012-11 API", "name": "Sprint 2012-11 API", "archived": true, "released": true, "releaseDate": "2012-06-03" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-29T19:45:49.000+0000", "created": "2012-05-24T14:41:47.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_clipboard", "qe-testadded" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-06T19:05:23.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": "h2. Problem\r\n\r\nThe setData, hasData and getData methods of [Titanium.UI.Clipboard|http://docs.appcelerator.com/titanium/2.0/index.html#!/api/Titanium.UI.Clipboard] do not have any effect. This is mostly because setData's source code only converts the input to string but does not save it. Also, has data should return a boolean, but does not.\r\n\r\nSee the test case below, and the source at [ClipboardModule.java|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/clipboard/ClipboardModule.java].\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nTi.UI.setBackgroundColor('#000');\r\nTi.UI.Clipboard.setData('text/plain', 'hello'); // does not store data\r\nTi.API.log('Does the Clipboard contain any data?...' + Ti.UI.Clipboard.hasData('text/plain')); // does not output boolean\r\nTi.API.log('Getting hello text from Clipboard...' + Ti.UI.Clipboard.getData('text/plain')); // does not generate any output\r\nTi.API.log('getText: ' + Ti.UI.Clipboard.getText()); // should this return data stored with setData where a mime type with a text prefix is specified?\r\n{code}\r\n\r\nh2. Logs\r\n\r\nNo errors are generated.\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: UI.Clipboard - setData, hasData and getData have no effect", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium 2.0.1 GA2\r\n* Android APIs 2.2\r\n* Emulator", "comment": { "comments": [ { "id": "196404", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "APIDOC fixed in https://github.com/appcelerator/titanium_mobile/pull/2269", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-29T18:05:13.000+0000", "updated": "2012-05-29T18:05:13.000+0000" }, { "id": "197200", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The clipboard methods setData, hasData, hasText, getData and getText returning appropriate values.\r\nVerified on:\r\nTitanium Studio: 2.1.0.201206010843\r\nTitanium SDK: 2.1.0.v20120604151821\r\nAndroid Emulator 2.2\r\nRuntime: v8", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-04T23:17:37.000+0000", "updated": "2012-06-04T23:17:37.000+0000" }, { "id": "278474", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4731\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-06T19:05:23.000+0000", "updated": "2013-11-06T19:05:23.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }