Controlling input for Google TTS API
I'm creating a TTS app using google's unofficial tts api and it works fine but the api can only process a maximum of 100 characters at a time but my application may have to send strings containing as many as 300 characters. 

Here is my code

    		try {
			String text = "bonjour comment allez-vous faire";
			
			text=text.replace(" ", "%20"); 
			String oLanguage="fr";
			
			MediaPlayer player = new MediaPlayer();
			player.setAudioStreamType(AudioManager.STREAM_MUSIC);			
			player.setDataSource("http://translate.google.com/translate_tts?tl=" + oLanguage + "&q=" + text);

			player.prepare();
			player.start(); 

		} catch (Exception e) { 
			// TODO: handle exception
		}

So my questions are

1. How do I get it to check the number of characters in the string and send only complete words within the 100 character limit.

2. How do I detect when the first group of TTS is finished so I can send the second to avoid both speech overlapping each other

3. Is there any need for me to use Asynctask for this process?
Controlling input for Google TTS API
===

I'm creating a TTS app using google's unofficial tts api and it works fine but the api can only process a maximum of 100 characters at a time but my application may have to send strings containing as many as 300 characters. 

Here is my code

    		try {
			String text = "bonjour comment allez-vous faire";
			
			text=text.replace(" ", "%20"); 
			String oLanguage="fr";
			
			MediaPlayer player = new MediaPlayer();
			player.setAudioStreamType(AudioManager.STREAM_MUSIC);			
			player.setDataSource("http://translate.google.com/translate_tts?tl=" + oLanguage + "&q=" + text);

			player.prepare();
			player.start(); 

		} catch (Exception e) { 
			// TODO: handle exception
		}

So my questions are

1. How do I get it to check the number of characters in the string and send only complete words within the 100 character limit.

2. How do I detect when the first group of TTS is finished so I can send the second to avoid both speech overlapping each other

3. Is there any need for me to use Asynctask for this process?