Every time I buy sometning that is not Motorola I regret it, and it is like 85% because of this feature. I don't know how they do it, but it triggers reliably, never misfires.
People always suggest apps that supposedly should allow the same thing, but they never work, which makes me think Motorola uses some lower level sensor access to do it.