public void start(Context context){
  mContext=context;
  SensorManager sm=(SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
  Sensor s=sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
  if (s == null) {
    Log.e(LOG_TAG,"No accelerometer in this device. Cannot use rage shake.");
    return;
  }
  sm.registerListener(this,s,SensorManager.SENSOR_DELAY_NORMAL);
}

public void start ( Context context ) { mContext = context ; SensorManager sm = ( SensorManager ) context . getSystemService ( Context . SENSOR_SERVICE ) ; Sensor s = sm . getDefaultSensor ( Sensor . TYPE_ACCELEROMETER ) ; if ( s == null ) { Log . e ( LOG_TAG , "No accelerometer in this device. Cannot use rage shake." ) ; return ; } sm . registerListener ( this , s , SensorManager . SENSOR_DELAY_NORMAL ) ; }
start the sensor detector
