Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-992] Shake gesture not implemented

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:54:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M06
ComponentsAndroid
Labelsaccelerometer, android, feature, refactor, release-1.6.0, shake
ReporterBill Dawson
AssigneeDon Thorp
Created2011-04-15T02:41:00.000+0000
Updated2011-04-17T01:54:54.000+0000

Description

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

Attachments

FileDateSize
app.js2011-04-15T02:41:01.000+00001947
gesture.zip2011-04-15T02:41:02.000+00004194195

Comments

  1. Opie Cyrus 2011-04-15

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

    This change also partially addresses #1386

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

  2. Opie Cyrus 2011-04-15

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

    Refactor of GestureModule, AccelerometerModule, TiSensorHelper and TiCompass to support shake event. Also added support for accelerometer to remain active even when the app is running in the background.
    https://github.com/appcelerator/titanium_mobile/commit/0351c2ba9989eda352e6067d8df57d7747675ae4"> https://github.com/appcelerator/titanium_mobile/commit/0351c2ba9989...

  3. Opie Cyrus 2011-04-15

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

  4. Don Thorp 2011-04-15

    Reminder, please add the configuration parameters to this ticket.

  5. Opie Cyrus 2011-04-15

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

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

  6. Don Thorp 2011-04-15

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

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

JSON Source