Compartilhar via


SensorManager.CreateDirectChannel Method

Definition

Overloads

CreateDirectChannel(HardwareBuffer)

Create a sensor direct channel backed by shared memory wrapped in HardwareBuffer object.

CreateDirectChannel(MemoryFile)

Create a sensor direct channel backed by shared memory wrapped in MemoryFile object.

CreateDirectChannel(HardwareBuffer)

Create a sensor direct channel backed by shared memory wrapped in HardwareBuffer object.

[Android.Runtime.Register("createDirectChannel", "(Landroid/hardware/HardwareBuffer;)Landroid/hardware/SensorDirectChannel;", "GetCreateDirectChannel_Landroid_hardware_HardwareBuffer_Handler", ApiSince=26)]
public virtual Android.Hardware.SensorDirectChannel? CreateDirectChannel (Android.Hardware.HardwareBuffer? mem);
[<Android.Runtime.Register("createDirectChannel", "(Landroid/hardware/HardwareBuffer;)Landroid/hardware/SensorDirectChannel;", "GetCreateDirectChannel_Landroid_hardware_HardwareBuffer_Handler", ApiSince=26)>]
abstract member CreateDirectChannel : Android.Hardware.HardwareBuffer -> Android.Hardware.SensorDirectChannel
override this.CreateDirectChannel : Android.Hardware.HardwareBuffer -> Android.Hardware.SensorDirectChannel

Parameters

mem
HardwareBuffer

A android.hardware.HardwareBuffer shared memory object.

Returns

A android.hardware.SensorDirectChannel object.

Attributes

Remarks

Create a sensor direct channel backed by shared memory wrapped in HardwareBuffer object.

The resulting channel can be used for delivering sensor events to native code, other processes, GPU/DSP or other co-processors without CPU intervention. This is the recommanded for high performance sensor applications that use high sensor rates (e.g. greater than 200Hz) and cares about sensor event latency.

Use the returned android.hardware.SensorDirectChannel object to configure direct report of sensor events. After use, call android.hardware.SensorDirectChannel#close() to free up resource in sensor system associated with the direct channel.

Java documentation for android.hardware.SensorManager.createDirectChannel(android.hardware.HardwareBuffer).

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

CreateDirectChannel(MemoryFile)

Create a sensor direct channel backed by shared memory wrapped in MemoryFile object.

[Android.Runtime.Register("createDirectChannel", "(Landroid/os/MemoryFile;)Landroid/hardware/SensorDirectChannel;", "GetCreateDirectChannel_Landroid_os_MemoryFile_Handler", ApiSince=26)]
public virtual Android.Hardware.SensorDirectChannel? CreateDirectChannel (Android.OS.MemoryFile? mem);
[<Android.Runtime.Register("createDirectChannel", "(Landroid/os/MemoryFile;)Landroid/hardware/SensorDirectChannel;", "GetCreateDirectChannel_Landroid_os_MemoryFile_Handler", ApiSince=26)>]
abstract member CreateDirectChannel : Android.OS.MemoryFile -> Android.Hardware.SensorDirectChannel
override this.CreateDirectChannel : Android.OS.MemoryFile -> Android.Hardware.SensorDirectChannel

Parameters

mem
MemoryFile

A android.os.MemoryFile shared memory object.

Returns

A android.hardware.SensorDirectChannel object.

Attributes

Remarks

Create a sensor direct channel backed by shared memory wrapped in MemoryFile object.

The resulting channel can be used for delivering sensor events to native code, other processes, GPU/DSP or other co-processors without CPU intervention. This is the recommanded for high performance sensor applications that use high sensor rates (e.g. greater than 200Hz) and cares about sensor event latency.

Use the returned android.hardware.SensorDirectChannel object to configure direct report of sensor events. After use, call android.hardware.SensorDirectChannel#close() to free up resource in sensor system associated with the direct channel.

Java documentation for android.hardware.SensorManager.createDirectChannel(android.os.MemoryFile).

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