Mediaplayer is not streaming the right url. I think it's an issue with translation and compiling, but I am unsure.
http://translate.google.com/translate_tts?tl=zh-TW&q=大. This is the url I want it to stream. It includes the chinese character.
It's streaming something like http://translate.google.com/translate_tts?tl=zh-TW&q=a.
Here is a code snippet:
MediaPlayer mPlayer = new MediaPlayer();
try{
mPlayer.setDataSource(url + chinese_array[0]);
mPlayer.prepareAsync();
Log.i("url", url + chinese_array[0]);
}catch(Exception e){
Log.e("mediaPlayer", e.toString());
}
There are no logcat errors. The stream is just the wrong sound. I initialized the array by pulling from a sqlite database, so that the compiler won't have to compile any chinese - not that it can't.
The Log.i("url"... ) line yields the correct url, but the mediaplayer doesn't play the correct sound. It plays the sound of the below url, and I want the mp3 of the above url.
I've looked around for problems like this, but have not come across any similar questions.
Is there a work around? Why is the mediaplayer playing the wrong sound?
Thanks