다음을 통해 공유


InputDevice.Descriptor Property

Definition

Gets the input device descriptor, which is a stable identifier for an input device.

public string? Descriptor { [Android.Runtime.Register("getDescriptor", "()Ljava/lang/String;", "")] get; }
[<get: Android.Runtime.Register("getDescriptor", "()Ljava/lang/String;", "")>]
member this.Descriptor : string

Property Value

The input device descriptor.

Attributes

Remarks

Gets the input device descriptor, which is a stable identifier for an input device.

An input device descriptor uniquely identifies an input device. Its value is intended to be persistent across system restarts, and should not change even if the input device is disconnected, reconnected or reconfigured at any time.

It is possible for there to be multiple InputDevice instances that have the same input device descriptor. This might happen in situations where a single human input device registers multiple InputDevice instances (HID collections) that describe separate features of the device, such as a keyboard that also has a touchpad. Alternately, it may be that the input devices are simply indistinguishable, such as two keyboards made by the same manufacturer.

The input device descriptor returned by #getDescriptor should only be used when an application needs to remember settings associated with a particular input device. For all other purposes when referring to a logical InputDevice instance at runtime use the id returned by #getId().

Java documentation for android.view.InputDevice.getDescriptor().

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