Ok...i Can post parts of it:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim AllLocales() As String
AllLocales = Array As String("ar", "bg", "da","de","el", "en", "es", "fi", "fr", "hr", "hu", "it", "ja", "lt", "lv", "nl", "no","pl","pt", "ro", "ru", "sk", "sl","sq", "sr", "sv", "th", "tr", "uk", "vi", "zh")
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ImageView1 As ImageView
Dim ImageView2 As ImageView
Dim ImageView3 As ImageView
Dim ImageView4 As ImageView
Dim Label1 As Label
Dim Label2 As Label
Dim tts2 As TTS
Dim Spinner1 As Spinner
Dim ToggleButton1 As ToggleButton
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
If FirstTime Then
tts2.Initialize("tts2")
End If
Laden
End Sub
Sub TTS2_Ready (Success As Boolean)
If Success Then
Dim listOfSupported As List
listOfSupported.Initialize
For i = 0 To AllLocales.Length - 1
Dim s() As String
s = Regex.Split("_", AllLocales(i))
If s.Length = 1 Then
If tts2.SetLanguage(s(0), "") = True Then listOfSupported.Add(AllLocales(i))
Else
If tts2.SetLanguage(s(0), s(1)) = True Then listOfSupported.Add(AllLocales(i))
End If
Next
For i = 0 To listOfSupported.Size - 1
Spinner1.Add(listOfSupported.Get(i)) 'print to the log
Next
End If
End Sub
Sub ToggleButton1_CheckedChange(Checked As Boolean)
If ToggleButton1.Checked = True Then
File.WriteString (File.DirInternal,"lang.txt",Spinner1.SelectedItem)
StartServiceAt(speaker,DateTime.Now + 1000,True)
Else
StopService(speaker)
End If
End Sub
Sub Spinner1_ItemClick (Position As Int, Value As Object)
End Sub
Sub Laden()
Dim Text1 As String
If File.Exists(File.DirInternal,"lang.txt") Then
Text1 = File.ReadString(File.DirInternal,"lang.txt")
ToastMessageShow(Text1,True)
Spinner1.SelectedIndex = Spinner1.IndexOf(Text1)
Else
ToastMessageShow("Please select your language first!",True)
End If
End Sub