Using internet connectivity in CheckVoiceData

8 views
Skip to first unread message

Alok Parlikar

unread,
Apr 13, 2010, 8:27:56 PM4/13/10
to TTS-for-Android
Hi,

In the Flite Engine plugin I am writing, one of my goals is to
simplify distribution of new voices. Here is what I currently do:

In CheckVoiceData, I connect to a certain web location to download the
list of available (or deprecated) voices.
That list is used to make decisions about which voices are available
(installed) or to-be-installed in the DownloadVoiceData activity.

Right now, in some situations, (such as weak wifi/2g connectivity)
launching TTS settings leads to Flite's CheckVoiceData waiting on
trying to download that file, resulting in a frozen application.

What might be a good way to fix this issue? How do I allow the voice
list to be synced with a server without assuming a good connection
active?

I currently don't have a timeout set for URLConnection, and i'll set
it some reasonable value.. But I guess there must be a better way to
do this.. :-?

- Alok

Charles Chen

unread,
Apr 13, 2010, 11:07:38 PM4/13/10
to tts-for...@googlegroups.com
I would suggest you ship with a predefined list of languages, and also kick off a background service that will do the web check. The check data activity can then return immediately by doing a check against what has already been downloaded previously, or the list that you shipped with.

Also, you may consider having a settings activity just so you can display a list of available voices and maybe a "Check for new voices" button. This way, if the user explicitly clicks that, you can put up a progress dialog and the user will understand what they are waiting for.

-Charles


--
You received this message because you are subscribed to the Google Groups "TTS-for-Android" group.
To post to this group, send email to tts-for...@googlegroups.com.
To unsubscribe from this group, send email to tts-for-andro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tts-for-android?hl=en.


Alok Parlikar

unread,
Apr 13, 2010, 11:10:32 PM4/13/10
to tts-for...@googlegroups.com
Good suggestions, thanks. I'll implement these.
Reply all
Reply to author
Forward
0 new messages