In Android, how can you query a TextToSpeech instance in order to find out what Engine it is using?
In the documentation, the only method that looks promising is TextToSpeech.getEngines(), but this method returns all Engines installed on the device and has nothing to do with a particular instance of TextToSpeech.
When you initialize an instance of TextToSpeech, you specify what Engine you want to use, and I can see in the source code for TextToSpeech that this parameter is stored in the variable:
private volatile String mCurrentEngine;
But since it's private, you can't query it directly and they don't seem to have provided a method to do so.
Can I (in theory) just copy that whole (source code) class into my project and change that variable to public? I tried doing that but I get too many errors that I don't know how to fix (missing annotations and classes without the option to import).
Is there a better way that I missed?
Thanks!