Hello, I use a function so that the user listens to a series of important messages, so that he does not have to keep an eye on the screen to read them, and cannot be skipped.
The problem is that in some devices it works fine and in others it shows the exception:
What should I check in Android to make sure that everything is correct?
Thank you very much.
This is the code:
B4X:
Dim TTS1 As TTS
TTS1.Initialize("TTS1")
Sub Habla( cTxt As String )
If cTxt.Length>0 Then
Try
TTS1.Speak(cTxt, True )
Dim jo As JavaObject = TTS1
Do While jo.RunMethod("isSpeaking",Null)
Sleep(250)
Loop
Catch
Log(LastException)
End Try
End If
End Sub
I have found the problem.
It is because they have no "TTS engine" enabled.
I have enabled one for them and it works on the devices that did not work before.
Thank you very much.