ToneGenerator.StartTone ToneGenerator.StartTone Method

Definition

Overloads

StartTone(Tone) StartTone(Tone)

This method starts the playback of a tone of the specified type.

StartTone(Tone, Int32) StartTone(Tone, Int32)

This method starts the playback of a tone of the specified type for the specified duration.

StartTone(Tone) StartTone(Tone)

This method starts the playback of a tone of the specified type.

[Android.Runtime.Register("startTone", "(I)Z", "GetStartTone_IHandler")]
public virtual bool StartTone (Android.Media.Tone toneType);
abstract member StartTone : Android.Media.Tone -> bool
override this.StartTone : Android.Media.Tone -> bool

Parameters

toneType
Tone Tone

The type of tone generated chosen from the following list:

Returns

Remarks

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.

StartTone(Tone, Int32) StartTone(Tone, Int32)

This method starts the playback of a tone of the specified type for the specified duration.

[Android.Runtime.Register("startTone", "(II)Z", "GetStartTone_IIHandler", ApiSince=5)]
public virtual bool StartTone (Android.Media.Tone toneType, int durationMs);
abstract member StartTone : Android.Media.Tone * int -> bool
override this.StartTone : Android.Media.Tone * int -> bool

Parameters

toneType
Tone Tone

The type of tone generated @see StartTone(Tone).

durationMs
Int32 Int32

The tone duration in milliseconds. If the tone is limited in time by definition, the actual duration will be the minimum of durationMs and the defined tone duration. Setting durationMs to -1, is equivalent to calling StartTone(Tone).

Returns

Remarks

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