2017-04-19 A small problem encountered
The payment collection function of the APP requires voice broadcast of individual push messages received. I heard this is called TTS (TextToSpeech).
I looked online android.speech.tts.TextToSpeech that comes with Android. I tried it, but it was very troublesome. A selection dialog box will pop up. I also tried it on Mi 2S and returned SUCCESS, but there was no sound. . . .
Okay, the test is normal, let’s try the effect.
The operation is the same as in the demo, there is nothing to pay special attention to. Except when using SpeechSynthesizer.shareInstance().start(str), the returned int may be equal to 20109. This is because the WeChat Open Platform AppID is written incorrectly or the package name signature is incorrect. This document is not written, please pay attention.
I just turned off the network and tried it. If there is no network, it will return -100. After reading the documentation again, I discovered that WeChat also requires an Internet connection. . .
sweat! Give iFlytek a try