I've put Shake detector sample for android developers, Enjoy!