{ "id": "170701", "key": "AC-5483", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-01-05T20:31:15.000+0000", "created": "2018-01-02T14:51:17.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-01-08T15:55:08.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hello,\r\n\r\n keypressed in TextField does not work on all the Android devices.\r\nAlso, from 7.0.1 titanioum sdk does not work at all.\r\n\r\nPlease check. Thank you in advance.\r\n\r\nBest,\r\nAndreas\r\n\r\n", "attachment": [], "flagged": false, "summary": "KEYPRESSED does not work on Android Devices", "creator": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Studio 5.0.0.GA, Appcelerator CLI 7.0.1.GA, Titanium SDK 7.0.1.GA", "comment": { "comments": [ { "id": "432657", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~andreas.pingas],\r\nThanks for sharing with us. It would be better if you can provide a sample project to reproduce the issue on our end. Also share your environment details .\r\n\r\nBest", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-01-03T05:06:47.000+0000", "updated": "2018-01-03T05:06:47.000+0000" }, { "id": "432667", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\tvar win = Titanium.UI.createWindow();\r\n\t\r\n\tvar phoneNumberText = Titanium.UI.createTextField({\r\n\t\theight:'60dip',\r\n\t \ttop:'0dip',\r\n\t\tleft:'10dip',\r\n\t\tright:'10dip',\r\n\t \thintText:'Phone Number',\r\n\t\ttextAlign:Titanium.UI.TEXT_ALIGNMENT_LEFT,\r\n\t\tverticalAlign:Titanium.UI.TEXT_VERTICAL_ALIGNMENT_CENTER,\r\n\t\tcolor:'#ED4030',\r\n\t\tborderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\t\tkeyboardType:Titanium.UI.KEYBOARD_TYPE_PHONE_PAD,\r\n\t\tfocusable:true\r\n\t});\r\n\r\n\twin.add(phoneNumberText);\r\n\t\t\r\n\tfunction isValid(e) {\r\n\t\t\r\n\t}\r\n\r\n\tphoneNumberText.addEventListener('keypressed', function(e) {\r\n\t\tTi.API.info('keypressed');\r\n\t\tisValid();\r\n\t});\r\n\t\r\n\twin.open();", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-03T09:30:18.000+0000", "updated": "2018-01-03T09:30:18.000+0000" }, { "id": "432697", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, To my understanding this event only fired when a hardware key is pressed. Not pressing soft keyboard in the display. See docs:\r\n\r\n\"A keypressed event is generated by pressing a hardware key. On Android, this event can only be fired when the property focusable is set to true.\"\r\n\r\nThanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-01-03T21:56:18.000+0000", "updated": "2018-01-03T21:56:18.000+0000" }, { "id": "432846", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\r\n\r\nIn titanium sdk 6.3.0 worked properly whereas in titanium sdk 7.0.1, by changing the sdk in some devices works and in some others does not.\r\n\r\nHowever, even in 6.3.0 it was not always working properly as sometimes works and sometimes does not. As a result i have replaced it with :\r\n\r\n\r\n\tvar myValue = '';\r\n\r\n\t\r\n\r\n\tphoneNumberText.addEventListener('change', function(e) {\r\n\r\n\t\tTi.API.info('change');\r\n\r\n\t\tif (e.value != myValue) {\r\n\r\n\t\tmyValue = e.value;\r\n\r\n\t\t\tisValid();\r\n\r\n\t\t}\r\n\r\n\t});\r\n\r\n\r\nYou need to make a change to prevent infinity loop", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-08T15:54:49.000+0000", "updated": "2018-01-08T15:55:08.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }