This class does exactly what is says and is the simplest class I've ever made.
Latest package (library files and samples)
Compiled samples (APK)
How to use
Declare a ShakeDetector in Sub Globals
Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Dim Detector As ShakeDetector End Sub
Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("Layout1") Detector.Initialize("Detector") End Sub
Sub Activity_Resume Detector.Start End Sub
Sub Activity_Pause (UserClosed As Boolean) Detector.Stop End Sub
Sub Detector_Shake Log("Shake it baby!") End Sub
- 1.0: Initial version
That's all for now folks!