Android Question setEngineByPackageName not working in Android 6.0.1

PhilE

Member
Licensed User
Longtime User
I am using the TTS and TTSID library's Using the following code

I have installed "com.cereproc.William" it is en GB. It shows up when I list the engines

For x = 0 To ttsID.GetEngines.Size-1
LstEngines.AddSingleLine(ttsID.getengines.Get(x))
Next


When I run the code on my Samsung SM T800 Android 6.0.1, it has no effect?

Sub TTS_Ready (Success As Boolean)
If Success Then
Dim R As Reflector
R.Target = tts
R.RunMethod2("setEngineByPackageName", "com.cereproc.William", "java.lang.String")
tts.SetLanguage("en","GB")
End If
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
Please use [CODE]code here...[/CODE] tags when posting code.

codetag001.png

codetag002.png

codetag003.png


See https://developer.android.com/refer...html#setEngineByPackageName(java.lang.String)
Setting the EngineByPackagename has been deprecated in Api 14.

You need to use
https://developer.android.com/refer...extToSpeech.OnInitListener, java.lang.String)
 
Last edited:
Upvote 0

PhilE

Member
Licensed User
Longtime User
1. Where do I find the "Code" box you suggested I use for reporting code issues?

2. I followed your second link to an Android help page with TextToSpeech, How do I use this in B4A?,
do I access it by way of DLL? Please advise.

Thanks a lot for your help. PhilE
 
Upvote 0
Top