{ "id": "61624", "key": "TIMOB-992", "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": "11239", "name": "Release 1.6.0 M06", "archived": true, "released": true, "releaseDate": "2011-01-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:54.000+0000", "created": "2011-04-15T02:41:00.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "accelerometer", "android", "feature", "refactor", "release-1.6.0", "shake" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01: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": "{html}

See #116 for 0.8x issues with Android shake - maybe\ninteresting.

{html}", "attachment": [ { "id": "17906", "filename": "app.js", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T02:41:01.000+0000", "size": 1947, "mimeType": "application/x-javascript" }, { "id": "17907", "filename": "gesture.zip", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T02:41:02.000+0000", "size": 4194195, "mimeType": "application/zip" } ], "flagged": false, "summary": "Shake gesture not implemented", "creator": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "124527", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Refactor of TiSensorHelper, TiCompass, GestureModule and\nAccelerometerModule. Major thing to note is that the accelerometer\nlisteners (GestureModule 'shake' event, Accelerometer 'update'\nevent and Geolocation 'heading' event) will need to manually be\nremoved when the app is paused or exited otherwise the\naccelerometer will be attached and sending events as long as the\napp is running in the background.

\n

This change also partially addresses #1386

\n

Test app for this this change is attached. In order to verify\nshake event, click 'Attach Shake' and then shake the device for a\nfew seconds. The event should be noted in the yellow status bar and\nin the trace log.

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T02:41:04.000+0000", "updated": "2011-04-15T02:41:04.000+0000" }, { "id": "124528", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

(from [0351c2ba9989eda352e6067d8df57d7747675ae4])\n[#992\nstate:fixed-in-qa] shake event implemented in gesture module

\n

Refactor of GestureModule, AccelerometerModule, TiSensorHelper\nand TiCompass to support shake event. Also added support for\naccelerometer to remain active even when the app is running in the\nbackground.
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/0351c2ba9989...

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T02:41:04.000+0000", "updated": "2011-04-15T02:41:04.000+0000" }, { "id": "124529", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Including an updated test that will actually turn on/off the\naccelerometer based on resume/pause.

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T02:41:04.000+0000", "updated": "2011-04-15T02:41:04.000+0000" }, { "id": "124530", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Reminder, please add the configuration parameters to this\nticket.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:04.000+0000", "updated": "2011-04-15T02:41:04.000+0000" }, { "id": "124531", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "{html}

Configuration params that can be added to the tiapp.xml to tweak\nthe shake behavior:

\n

ti.android.shake.factor (double)
\nti.android.shake.quiet.milliseconds (int)
\nti.android.shake.active.milliseconds (int)

{html}", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2011-04-15T02:41:04.000+0000", "updated": "2011-04-15T02:41:04.000+0000" }, { "id": "124532", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a

\n

we may want to tune this more before it goes out. Active seems\ntoo long.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:05.000+0000", "updated": "2011-04-15T02:41:05.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }