{ "id": "63609", "key": "TIMOB-2977", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-07T18:05:52.000+0000", "created": "2011-04-15T03:34:02.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "defect", "ios", "reported-1.5.1", "reported-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-07T18:05:52.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Tested in simulator by user: iOS 4.2, Ti SDK 1.5.1 & 1.6.X\n(continuous)
\nTested on device by rickblalock: iOS 4.2, 1.6.X (continuous 27 Jan\n2011)

\n

User reported issue in \nthis Q&A post. He explains:

\n

Tested in simulator:

\n\n
\nvar win = Ti.UI.currentWindow; \nwin.backgroundColor = '#fff';\n \nTi.Gesture.addEventListener('shake',function(e)\n{\n    alert(e.source+\" \"+e.timestamp+\" \"+e.type);\n});\n\nvar serSearch = Titanium.UI.createSearchBar({\n    barColor:'#444', \n    showCancel:false,\n    height:60,\n    top:0,\n    left:0,\n    keyboardType:0\n});\n \nserSearch.addEventListener(\"return\", function(e)\n{\n    serSearch.blur();\n});\n\nwin.add(serSearch);\n
\n

blainH stated:

\n

The shake gesture is trapped at the root, when it's the\nfirstResponder.
\nWhile text entry is up, it's not the first responder.
\nSo I can see why the bug's doing what it's doing.
\nCan fix, but not for 1.6
\nActually, possibly not possible to fix. I'd have to look into\nit.

{html}", "attachment": [], "flagged": false, "summary": "Shake gesture not recognized after searchBar blur", "creator": { "name": "hal", "key": "hal", "displayName": "hal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "129793", "author": { "name": "yannoffredi", "key": "yannoffredi", "displayName": "yann Offredi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I have been using this for solved my problem :

\n
\nvar timestampAccTmp = 0;\nvar timeResolution = 200;\nTi.Accelerometer.addEventListener('update',function(e)\n{\n    timestampAcc = e.timestamp;\n    diffTime = timestampAcc - timestampAccTmp;\n    //alert(e.x+\" \"+e.y+\" \"+e.z+\" \"+timestampAcc+\" \"+timestampAccTmp+\" \"+diffTime);\n    \n    \n    if(diffTime > timeResolution)\n    {\n        xpos.text = \"XX :\"+e.x;\n        ypos.text = \"YX :\"+e.y;\n        zpos.text = \"ZX :\"+e.z;\n        violence = 1;\n        shake = false;\n        \n        xtop = Math.abs(e.x);\n        ytop = Math.abs(e.y);\n        ztop = Math.abs(e.z);\n        \n        Titanium.API.debug(xtop+\" \"+ytop+\" \"+ztop);\n        \n        if ( xtop> violence * 1)\n        {\n            shake = true;\n        }\n        if (ytop > violence * 2)\n        {\n            shake = true;\n        }\n        if (ztop > violence * 3)\n        {\n            shake = true;\n        }\n        if (shake) \n        {\n            alert(\"shake detected \"+xtop+\" \"+ytop+\" \"+ztop);\n        } \n        timestampAccTmp = timestampAcc;\n    }\n    \n    \n});\n
\n

thanks

{html}", "updateAuthor": { "name": "yannoffredi", "key": "yannoffredi", "displayName": "yann Offredi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:34:03.000+0000", "updated": "2011-04-15T03:34:03.000+0000" }, { "id": "421191", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-07T18:05:52.000+0000", "updated": "2017-06-07T18:05:52.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }