I am using exactly this code in this example
What should i include in MyMethod() to stop the listener and don`t wait for another shake after MyMethod() is called the first time?
Thanks
The line
sensorMgr.unregisterListener(this);
will make the system stop sending you onSensorChanged updates