New version
Change from deprecated API as reported by Hossein at http://stackoverflow.com/questions/19706969/android-shake-detection/19785620#19785620
Apparently this also solves a problem that an incoming text would activate a shake!