{ "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.
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.
\nThis change also partially addresses #1386
\nTest 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.
(from [0351c2ba9989eda352e6067d8df57d7747675ae4])\n[#992\nstate:fixed-in-qa] shake event implemented in gesture module
\nRefactor 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...
Including an updated test that will actually turn on/off the\naccelerometer based on resume/pause.
Reminder, please add the configuration parameters to this\nticket.
Configuration params that can be added to the tiapp.xml to tweak\nthe shake behavior:
\nti.android.shake.factor (double)
\nti.android.shake.quiet.milliseconds (int)
\nti.android.shake.active.milliseconds (int)
Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a
\nwe may want to tune this more before it goes out. Active seems\ntoo long.