TextToSpeech.AddEarcon Method

Definition

Overloads

AddEarcon(String, Uri)

Adds a mapping between a string of text and a sound file.

AddEarcon(String, File)

Adds a mapping between a string of text and a sound file.

AddEarcon(String, String)
Obsolete.

Adds a mapping between a string of text and a sound file.

AddEarcon(String, String, Int32)

Adds a mapping between a string of text and a sound resource in a package.

AddEarcon(String, Uri)

Adds a mapping between a string of text and a sound file.

[Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Landroid/net/Uri;)I", "GetAddEarcon_Ljava_lang_String_Landroid_net_Uri_Handler", ApiSince=31)]
public virtual Android.Speech.Tts.OperationResult AddEarcon (string earcon, Android.Net.Uri uri);
[<Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Landroid/net/Uri;)I", "GetAddEarcon_Ljava_lang_String_Landroid_net_Uri_Handler", ApiSince=31)>]
abstract member AddEarcon : string * Android.Net.Uri -> Android.Speech.Tts.OperationResult
override this.AddEarcon : string * Android.Net.Uri -> Android.Speech.Tts.OperationResult

Parameters

earcon
String

The name of the earcon. Example: "[tick]"

uri
Uri

Uri object pointing to the sound file.

Returns

Code indicating success or failure. See #ERROR and #SUCCESS.

Attributes

Remarks

Adds a mapping between a string of text and a sound file. Use this to add custom earcons.

Java documentation for android.speech.tts.TextToSpeech.addEarcon(java.lang.String, android.net.Uri).

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

AddEarcon(String, File)

Adds a mapping between a string of text and a sound file.

[Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Ljava/io/File;)I", "GetAddEarcon_Ljava_lang_String_Ljava_io_File_Handler")]
public virtual Android.Speech.Tts.OperationResult AddEarcon (string? earcon, Java.IO.File? file);
[<Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Ljava/io/File;)I", "GetAddEarcon_Ljava_lang_String_Ljava_io_File_Handler")>]
abstract member AddEarcon : string * Java.IO.File -> Android.Speech.Tts.OperationResult
override this.AddEarcon : string * Java.IO.File -> Android.Speech.Tts.OperationResult

Parameters

earcon
String

The name of the earcon. Example: "[tick]"

file
File

File object pointing to the sound file.

Returns

Code indicating success or failure. See #ERROR and #SUCCESS.

Attributes

Remarks

Adds a mapping between a string of text and a sound file. Use this to add custom earcons.

Java documentation for android.speech.tts.TextToSpeech.addEarcon(java.lang.String, java.io.File).

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

AddEarcon(String, String)

Caution

deprecated

Adds a mapping between a string of text and a sound file.

[Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Ljava/lang/String;)I", "GetAddEarcon_Ljava_lang_String_Ljava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public virtual Android.Speech.Tts.OperationResult AddEarcon (string? earcon, string? filename);
[<Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Ljava/lang/String;)I", "GetAddEarcon_Ljava_lang_String_Ljava_lang_String_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member AddEarcon : string * string -> Android.Speech.Tts.OperationResult
override this.AddEarcon : string * string -> Android.Speech.Tts.OperationResult

Parameters

earcon
String

The name of the earcon. Example: "[tick]"

filename
String

The full path to the sound file (for example: "/sdcard/mysounds/tick.wav")

Returns

Code indicating success or failure. See #ERROR and #SUCCESS.

Attributes

Remarks

Adds a mapping between a string of text and a sound file. Use this to add custom earcons.

This member is deprecated. As of API level 21, replaced by #addEarcon(String, File).

Java documentation for android.speech.tts.TextToSpeech.addEarcon(java.lang.String, java.lang.String).

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

AddEarcon(String, String, Int32)

Adds a mapping between a string of text and a sound resource in a package.

[Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Ljava/lang/String;I)I", "GetAddEarcon_Ljava_lang_String_Ljava_lang_String_IHandler")]
public virtual Android.Speech.Tts.OperationResult AddEarcon (string? earcon, string? packagename, int resourceId);
[<Android.Runtime.Register("addEarcon", "(Ljava/lang/String;Ljava/lang/String;I)I", "GetAddEarcon_Ljava_lang_String_Ljava_lang_String_IHandler")>]
abstract member AddEarcon : string * string * int -> Android.Speech.Tts.OperationResult
override this.AddEarcon : string * string * int -> Android.Speech.Tts.OperationResult

Parameters

earcon
String

The name of the earcon. Example: "[tick]"<br/>

packagename
String

the package name of the application that contains the resource. This can for instance be the package name of your own application. Example: <b>"com.google.marvin.compass"</b><br/> The package name can be found in the AndroidManifest.xml of the application containing the resource. <p> &lt;manifest xmlns:android=&quot;...&quot; package=&quot;<b>com.google.marvin.compass</b>&quot;&gt;</p>

resourceId
Int32

Example: R.raw.tick_snd

Returns

Code indicating success or failure. See #ERROR and #SUCCESS.

Attributes

Remarks

Adds a mapping between a string of text and a sound resource in a package. Use this to add custom earcons.

Java documentation for android.speech.tts.TextToSpeech.addEarcon(java.lang.String, java.lang.String, 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