Sdílet prostřednictvím


HapticGenerator.Create(Int32) Method

Definition

Creates a HapticGenerator and attaches it to the given audio session.

[Android.Runtime.Register("create", "(I)Landroid/media/audiofx/HapticGenerator;", "", ApiSince=31)]
public static Android.Media.Audiofx.HapticGenerator Create (int audioSession);
[<Android.Runtime.Register("create", "(I)Landroid/media/audiofx/HapticGenerator;", "", ApiSince=31)>]
static member Create : int -> Android.Media.Audiofx.HapticGenerator

Parameters

audioSession
Int32

system wide unique audio session identifier. The HapticGenerator will be applied to the players with the same audio session.

Returns

HapticGenerator created or null if the device does not support HapticGenerator or the audio session is invalid.

Attributes

Remarks

Creates a HapticGenerator and attaches it to the given audio session. Use android.media.AudioTrack#getAudioSessionId() or android.media.MediaPlayer#getAudioSessionId() to apply this effect on specific AudioTrack or MediaPlayer instance.

Java documentation for android.media.audiofx.HapticGenerator.create(int).

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