title: How to set delay of Android Sensors programmatically?
body: <p>If there any method to change delay of andriod sensor other using constant like "Normal_Delay, ...". </p>
  
  <p>I want to put the delay value as I like. if this is possible ?</p>
  
  <p>Actually, I found a solution by using "handler" but it doesn't work. </p>
  
  <p>Here is the solution with Handler but it doesn't work:</p>
  
  <pre><code>public void registerSensorListener() {
      String sensorName = PackageManager.FEATURE_SENSOR_ACCELEROMETER;
      if (mHandlerThread == null) {
          mHandlerThread = new HandlerThread("sensorThread");
      }
      if (!mHandlerThread.isAlive()) {
  
          if (SensorUtil.isDeviceHasSensor(sensorName,
                  activity.getApplication())) {
              mHandlerThread.start();
              handler = new Handler(mHandlerThread.getLooper());
              mSensorManager.registerListener(this, mAccelerometer, 1000000,
                      handler);
              eventHandler.isDeviceHasSensor(true);
          } else {
              Log.d("Device dos't have Sensor ",
                      PackageManager.FEATURE_SENSOR_ACCELEROMETER);
              eventHandler.isDeviceHasSensor(false);
          }
      } else {
          Log.d("Your Sensor is registered", sensorName);
      }
  
  }
  </code></pre>
  
  <p>and creating Handler like this </p>
  
  <p>HandlerThread mHandlerThread;
  Handler handler;</p>
  
  <p>mHandlerThread = new HandlerThread("sensorThread");</p>