Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1925] iOS: "shake" not firing

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:33.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsdefect, shake
ReporterThomas Huelbert
AssigneeBlain Hamon
Created2011-04-15T03:05:46.000+0000
Updated2011-04-17T01:57:33.000+0000

Description

iPod (4.1) with mobile sdk build 1.4.2.e6bd67

1.Phone>Shake
2.Sake and look for the alert

results: no alert, 1.4.0 KS works as expected on same device.

Comments

  1. Stephen Tramer 2011-04-15

    Works for me on both iPhone 2G (3.1.x) and iPod Touch 3G (4.1). The issue may be that accelerometers in more recent devices may be more precise than the original calibration values for 'shake' (which appear to be for 2G devices). Had to give the iPod a pretty good shake, but the iPhone took a love tap.

    We really need a "works-for-me" setting in Lighthouse. Marking this invalid for now.

  2. Thomas Huelbert 2011-04-15

    must be device specific - I can get the 3rd gen ipod to work, and the iphone 3g I have, but no matter how much I wail on the 4th gen ipod, no alert appears. As this is device specific and we have a a 4th gen ipod at the mothership, switching to Blain as assigned.

  3. Stephen Tramer 2011-04-15

    Worth mentioning that there's a strong possibility this is an Apple bug - we're just trapping an iOS/device-generated event and using it to send our own notification.

  4. Blain Hamon 2011-04-15

    So wait, the MV office is the mothership? I thought that was reserved for talking about Apple.

    It could be an apple bug, or it could be a case of gaining focus. I recall that a view has to have focus in order to receive the shake event.

  5. Blain Hamon 2011-04-15

    Hunh. Turns out the bug's always been there, but it's subtle. The first shake that is listened for will fire correctly always, but after that, a shake event will be fired only if it was within 1 second of a previous shake. So testing with shaking fast would get the event (for all but the first shake in a group), but a proper single shake would not fire.

    Removing the regression tag, but checking in a fix.

    Note that issue 2048 still is unfixed, so that all testing has to be done on the first time the shake window is opened (until 2048 is fixed), as later window openings will exhibit 2048's symptoms, and block the fix from working properly.

  6. Blain Hamon 2011-04-15

    Hunh. http://github.com/appcelerator/titanium_mobile/commit/86bad520f0a0187f3b419ad4ae3a67205be0ad5e"> http://github.com/appcelerator/titanium_mobile/commit/86bad520f0a01... failed to update the status.

  7. Thomas Huelbert 2011-04-15

    iPod 4th gen (4.1), 3g (3.1.2) with mobile sdk build 1.5.0.62c1cae

  8. Jeff Haynie 2011-04-15

    (from [86bad520f0a0187f3b419ad4ae3a67205be0ad5e]) [#1925 state:fixed-in-qa] Shake event is fixed to fire on the first event and ignore constant shaking, instead of report the constant shaking and ignore the first event. Note that #2048 may mask this fix in its interactions http://github.com/appcelerator/titanium_mobile/commit/86bad520f0a0187f3b419ad4ae3a67205be0ad5e"> http://github.com/appcelerator/titanium_mobile/commit/86bad520f0a01...

JSON Source