A
A
Alexander Vasyuchenko2016-04-04 12:03:21
Android
Alexander Vasyuchenko, 2016-04-04 12:03:21

Is it necessary to call TextToSpeech.shutdown() in the onDestroy method?

The documentation says that you need to call TextToSpeech.shutdown () in the onDestroy method of the activity.
Is this a must?
The problem is that onDestroy is called every time the screen is rotated and the speech synthesizer needs to be re-initialized every time, and this is a few seconds of delay ... How to solve this problem?
Prohibiting the re-creation of the activity is not an option, I need it, because. different layouts are used for different orientations.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question