Despite Android being a multi-threaded, some API classes impose a strict requirement of having to only run on the UI thread.
For example,
- All SpeechRecognizer's methods "must be invoked only from the main application thread."
- The Android Developer's Threads section describes components from the android.widget and android.view packages as having to run on the main/UI thread.
- According to this SO answer, TextToSpeech constructor also needs to be called from the main/UI thread.
- The CountDownTimer must also be created on the UI thread, if its thread does not have a Looper.
Which other classes require their methods runOnUiThread()?
Is there a comprehensive list of such classes in the Android SDK?