Android Guides | Samples

Android.Media.ToneGenerator Class

This class provides methods to play DTMF tones (ITU-T Recommendation Q.23), call supervisory tones (3GPP TS 22.

See Also: ToneGenerator

Syntax

[Android.Runtime.Register("android/media/ToneGenerator", DoNotGenerateAcw=true)]
public class ToneGenerator : Object

Remarks

This class provides methods to play DTMF tones (ITU-T Recommendation Q.23), call supervisory tones (3GPP TS 22.001, CEPT) and proprietary tones (3GPP TS 31.111). Depending on call state and routing options, tones are mixed to the downlink audio or output to the speaker phone or headset. This API is not for generating tones over the uplink audio path.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Media.ToneGenerator are listed below.

See Also: Object

Public Constructors

ToneGenerator class contructor specifying output stream type and volume.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
AudioSessionIdInt32. Returns the audio session ID.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Release()
Releases resources associated with this ToneGenerator object.
StartTone(Tone) : Boolean
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.
StartTone(Tone, Int32) : Boolean
This method starts the playback of a tone of the specified type for the specified duration.
StopTone()
This method stops the tone currently playing playback.