Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Voice Application Development for Android

You're reading from   Voice Application Development for Android A practical guide to develop advanced and exciting voice applications for Android using open source software

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781783285297
Length 134 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (19) Chapters Close

Voice Application Development for Android
Credits
Foreword
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Speech on Android Devices FREE CHAPTER 2. Text-to-Speech Synthesis 3. Speech Recognition 4. Simple Voice Interactions 5. Form-filling Dialogs 6. Grammars for Dialog 7. Multilingual and Multimodal Dialogs 8. Dialogs with Virtual Personal Assistants 9. Taking it Further Afterword
Index

Threading


We will use XML files for various purposes in the remaining chapters and have encapsulated the common code in the XMLLib library. One important issue involves threading. When launching an app, a thread is created to run the code. This thread is responsible for the actions that involve updating the user interface, so it is sometimes called the UI thread. Carrying out very expensive operations in the UI thread, such as downloading files, carrying out HTTP requests, opening socket connections, or accessing databases, might block the UI thread for a long time, making it unresponsive and freezing updates of the interface. For this reason from Android 3 (HoneyComb) onwards, when trying to perform a networking operation on the main thread of an Android app, the android.os.NetworkOnMainThreadException is raised.

Android provides several ways to enable communication between background threads and the UI thread as explained here: http://developer.android.com/guide/components/processes-and...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image