Class ShadowSensor

java.lang.Object
org.robolectric.shadows.ShadowSensor

@Implements(android.hardware.Sensor.class) public class ShadowSensor extends Object
  • Constructor Details

    • ShadowSensor

      public ShadowSensor()
  • Method Details

    • newInstance

      public static Sensor newInstance(int type)
      Constructs a Sensor with a given type.
    • setWakeUpFlag

      public void setWakeUpFlag(boolean wakeup)
      Controls the return value of Sensor.isWakeUpSensor().
    • setMaximumRange

      public void setMaximumRange(float range)
      Sets the return value for Sensor.getMaximumRange().
    • getMaximumRange

      @Implementation protected float getMaximumRange()