Sdílet prostřednictvím


NotificationChannel.SetVibrationPattern(Int64[]) Method

Definition

Sets the vibration pattern for notifications posted to this channel.

[Android.Runtime.Register("setVibrationPattern", "([J)V", "", ApiSince=26)]
public void SetVibrationPattern (long[]? vibrationPattern);
[<Android.Runtime.Register("setVibrationPattern", "([J)V", "", ApiSince=26)>]
member this.SetVibrationPattern : int64[] -> unit

Parameters

vibrationPattern
Int64[]
Attributes

Remarks

Sets the vibration pattern for notifications posted to this channel. If the provided pattern is valid (non-null, non-empty), will enable vibration on this channel (equivalent to calling #enableVibration(boolean) with true). Otherwise, vibration will be disabled unless #enableVibration(boolean) is used with true, in which case the default vibration will be used.

Only modifiable before the channel is submitted to NotificationManager#createNotificationChannel(NotificationChannel).

Java documentation for android.app.NotificationChannel.setVibrationPattern(long[]).

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