SensorManager.UnregisterListener Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UnregisterListener(ISensorEventListener, Sensor) |
Unregisters a listener for the sensors with which it is registered. |
UnregisterListener(ISensorEventListener) |
Unregisters a listener for all sensors. |
UnregisterListener(ISensorListener) |
Obsolete.
Unregisters a listener for all sensors. |
UnregisterListener(ISensorListener, Int32) |
Obsolete.
Unregisters a listener for the sensors with which it is registered. |
UnregisterListener(ISensorEventListener, Sensor)
Unregisters a listener for the sensors with which it is registered.
[Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorEventListener;Landroid/hardware/Sensor;)V", "GetUnregisterListener_Landroid_hardware_SensorEventListener_Landroid_hardware_Sensor_Handler")]
public virtual void UnregisterListener (Android.Hardware.ISensorEventListener? listener, Android.Hardware.Sensor? sensor);
[<Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorEventListener;Landroid/hardware/Sensor;)V", "GetUnregisterListener_Landroid_hardware_SensorEventListener_Landroid_hardware_Sensor_Handler")>]
abstract member UnregisterListener : Android.Hardware.ISensorEventListener * Android.Hardware.Sensor -> unit
override this.UnregisterListener : Android.Hardware.ISensorEventListener * Android.Hardware.Sensor -> unit
Parameters
- listener
- ISensorEventListener
a SensorEventListener object
- sensor
- Sensor
the sensor to unregister from
- Attributes
Exceptions
when sensor is a trigger sensor.
Remarks
Unregisters a listener for the sensors with which it is registered.
<p class="note"> Note: Don't use this method with a one shot trigger sensor such as Sensor#TYPE_SIGNIFICANT_MOTION
. Use #cancelTriggerSensor(TriggerEventListener, Sensor)
instead. </p>
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
- UnregisterListener(ISensorEventListener)
- <xref:Android.Hardware.SensorManager.RegisterListener(Android.Hardware.ISensorEventListener%2c+Android.Hardware.Sensor%2c+Android.Hardware.Sensor)>
Applies to
UnregisterListener(ISensorEventListener)
Unregisters a listener for all sensors.
[Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorEventListener;)V", "GetUnregisterListener_Landroid_hardware_SensorEventListener_Handler")]
public virtual void UnregisterListener (Android.Hardware.ISensorEventListener? listener);
[<Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorEventListener;)V", "GetUnregisterListener_Landroid_hardware_SensorEventListener_Handler")>]
abstract member UnregisterListener : Android.Hardware.ISensorEventListener -> unit
override this.UnregisterListener : Android.Hardware.ISensorEventListener -> unit
Parameters
- listener
- ISensorEventListener
a SensorListener object
- Attributes
Remarks
Unregisters a listener for all sensors.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
See also
- <xref:Android.Hardware.SensorManager.UnregisterListener(Android.Hardware.ISensorEventListener%2c+Android.Hardware.Sensor)>
- <xref:Android.Hardware.SensorManager.RegisterListener(Android.Hardware.ISensorEventListener%2c+Android.Hardware.Sensor%2c+Android.Hardware.Sensor)>
Applies to
UnregisterListener(ISensorListener)
Caution
deprecated
Unregisters a listener for all sensors.
[Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorListener;)V", "GetUnregisterListener_Landroid_hardware_SensorListener_Handler")]
[System.Obsolete("deprecated")]
public virtual void UnregisterListener (Android.Hardware.ISensorListener? listener);
[<Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorListener;)V", "GetUnregisterListener_Landroid_hardware_SensorListener_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member UnregisterListener : Android.Hardware.ISensorListener -> unit
override this.UnregisterListener : Android.Hardware.ISensorListener -> unit
Parameters
- listener
- ISensorListener
a SensorListener object
- Attributes
Remarks
Unregisters a listener for all sensors.
This member is deprecated. This method is deprecated, use SensorManager#unregisterListener(SensorEventListener)
instead.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
UnregisterListener(ISensorListener, Int32)
Caution
deprecated
Unregisters a listener for the sensors with which it is registered.
[Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorListener;I)V", "GetUnregisterListener_Landroid_hardware_SensorListener_IHandler")]
[System.Obsolete("deprecated")]
public virtual void UnregisterListener (Android.Hardware.ISensorListener? listener, int sensors);
[<Android.Runtime.Register("unregisterListener", "(Landroid/hardware/SensorListener;I)V", "GetUnregisterListener_Landroid_hardware_SensorListener_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member UnregisterListener : Android.Hardware.ISensorListener * int -> unit
override this.UnregisterListener : Android.Hardware.ISensorListener * int -> unit
Parameters
- listener
- ISensorListener
a SensorListener object
- sensors
- Int32
a bit masks of the sensors to unregister from
- Attributes
Remarks
Unregisters a listener for the sensors with which it is registered.
This member is deprecated. This method is deprecated, use SensorManager#unregisterListener(SensorEventListener, Sensor)
instead.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.