There has been a bunch of attrition at work, so I have to help taking over some Android code. So, to learn the Android platform, I decided to make a sample application that receives incoming SMS messages and send them through the text-to-speech processor. I put the code on github. I managed to get it to work on an emulator in a couple of days, as the Android platform is pretty easy to learn and pretty well documented. I haven't tried it on a real phone, since I wrote it for Android 2.1, and phones at work run Android 1.6.
The one thing that I had problems with was the service lifecycle interfering with the asynchronous text-to-speech interface. My ugly solution was to have the service post an empty intent to itself while the text-to-speech was still speaking to keep the service alive, since the text-to-speech instance would have been considered leaked if it isn't shutdown when the service is destroyed. If I continue working on Android applications, I'll probably find a better way to do it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment