다음을 통해 공유


ToneGenerator.StartTone Method

Definition

Overloads

StartTone(Tone)

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

StartTone(Tone, Int32)

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

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);
[<Android.Runtime.Register("startTone", "(I)Z", "GetStartTone_IHandler")>]
abstract member StartTone : Android.Media.Tone -> bool
override this.StartTone : Android.Media.Tone -> bool

Parameters

toneType
Tone

The type of tone generated chosen from the following list: <ul> <li>#TONE_DTMF_0<li>#TONE_DTMF_1<li>#TONE_DTMF_2<li>#TONE_DTMF_3<li>#TONE_DTMF_4<li>#TONE_DTMF_5<li>#TONE_DTMF_6<li>#TONE_DTMF_7<li>#TONE_DTMF_8<li>#TONE_DTMF_9<li>#TONE_DTMF_A<li>#TONE_DTMF_B<li>#TONE_DTMF_C<li>#TONE_DTMF_D<li>#TONE_SUP_DIAL<li>#TONE_SUP_BUSY<li>#TONE_SUP_CONGESTION<li>#TONE_SUP_RADIO_ACK<li>#TONE_SUP_RADIO_NOTAVAIL<li>#TONE_SUP_ERROR<li>#TONE_SUP_CALL_WAITING<li>#TONE_SUP_RINGTONE<li>#TONE_PROP_BEEP<li>#TONE_PROP_ACK<li>#TONE_PROP_NACK<li>#TONE_PROP_PROMPT<li>#TONE_PROP_BEEP2<li>#TONE_SUP_INTERCEPT<li>#TONE_SUP_INTERCEPT_ABBREV<li>#TONE_SUP_CONGESTION_ABBREV<li>#TONE_SUP_CONFIRM<li>#TONE_SUP_PIP<li>#TONE_CDMA_DIAL_TONE_LITE<li>#TONE_CDMA_NETWORK_USA_RINGBACK<li>#TONE_CDMA_INTERCEPT<li>#TONE_CDMA_ABBR_INTERCEPT<li>#TONE_CDMA_REORDER<li>#TONE_CDMA_ABBR_REORDER<li>#TONE_CDMA_NETWORK_BUSY<li>#TONE_CDMA_CONFIRM<li>#TONE_CDMA_ANSWER<li>#TONE_CDMA_NETWORK_CALLWAITING<li>#TONE_CDMA_PIP<li>#TONE_CDMA_CALL_SIGNAL_ISDN_NORMAL<li>#TONE_CDMA_CALL_SIGNAL_ISDN_INTERGROUP<li>#TONE_CDMA_CALL_SIGNAL_ISDN_SP_PRI<li>#TONE_CDMA_CALL_SIGNAL_ISDN_PAT3<li>#TONE_CDMA_CALL_SIGNAL_ISDN_PING_RING<li>#TONE_CDMA_CALL_SIGNAL_ISDN_PAT5<li>#TONE_CDMA_CALL_SIGNAL_ISDN_PAT6<li>#TONE_CDMA_CALL_SIGNAL_ISDN_PAT7<li>#TONE_CDMA_HIGH_L<li>#TONE_CDMA_MED_L<li>#TONE_CDMA_LOW_L<li>#TONE_CDMA_HIGH_SS<li>#TONE_CDMA_MED_SS<li>#TONE_CDMA_LOW_SS<li>#TONE_CDMA_HIGH_SSL<li>#TONE_CDMA_MED_SSL<li>#TONE_CDMA_LOW_SSL<li>#TONE_CDMA_HIGH_SS_2<li>#TONE_CDMA_MED_SS_2<li>#TONE_CDMA_LOW_SS_2<li>#TONE_CDMA_HIGH_SLS<li>#TONE_CDMA_MED_SLS<li>#TONE_CDMA_LOW_SLS<li>#TONE_CDMA_HIGH_S_X4<li>#TONE_CDMA_MED_S_X4<li>#TONE_CDMA_LOW_S_X4<li>#TONE_CDMA_HIGH_PBX_L<li>#TONE_CDMA_MED_PBX_L<li>#TONE_CDMA_LOW_PBX_L<li>#TONE_CDMA_HIGH_PBX_SS<li>#TONE_CDMA_MED_PBX_SS<li>#TONE_CDMA_LOW_PBX_SS<li>#TONE_CDMA_HIGH_PBX_SSL<li>#TONE_CDMA_MED_PBX_SSL<li>#TONE_CDMA_LOW_PBX_SSL<li>#TONE_CDMA_HIGH_PBX_SLS<li>#TONE_CDMA_MED_PBX_SLS<li>#TONE_CDMA_LOW_PBX_SLS<li>#TONE_CDMA_HIGH_PBX_S_X4<li>#TONE_CDMA_MED_PBX_S_X4<li>#TONE_CDMA_LOW_PBX_S_X4<li>#TONE_CDMA_ALERT_NETWORK_LITE<li>#TONE_CDMA_ALERT_AUTOREDIAL_LITE<li>#TONE_CDMA_ONE_MIN_BEEP<li>#TONE_CDMA_KEYPAD_VOLUME_KEY_LITE<li>#TONE_CDMA_PRESSHOLDKEY_LITE<li>#TONE_CDMA_ALERT_INCALL_LITE<li>#TONE_CDMA_EMERGENCY_RINGBACK<li>#TONE_CDMA_ALERT_CALL_GUARD<li>#TONE_CDMA_SOFT_ERROR_LITE<li>#TONE_CDMA_CALLDROP_LITE<li>#TONE_CDMA_NETWORK_BUSY_ONE_SHOT<li>#TONE_CDMA_ABBR_ALERT<li>#TONE_CDMA_SIGNAL_OFF</ul>

Returns

Attributes

Remarks

This method starts the playback of a tone of the specified type. only one tone can play at a time: if a tone is playing while this method is called, this tone is stopped and replaced by the one requested.

Java documentation for android.media.ToneGenerator.startTone(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.

See also

  • <xref:Android.Media.ToneGenerator(Android.Media.Stream%2c+Android.Media.Volume)>

Applies to

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")]
public virtual bool StartTone (Android.Media.Tone toneType, int durationMs);
[<Android.Runtime.Register("startTone", "(II)Z", "GetStartTone_IIHandler")>]
abstract member StartTone : Android.Media.Tone * int -> bool
override this.StartTone : Android.Media.Tone * int -> bool

Parameters

toneType
Tone

The type of tone generated

durationMs
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(int).

Returns

Attributes

Remarks

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

Java documentation for android.media.ToneGenerator.startTone(int, 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