void OnApplicationPause(bool val) { if (speechPlugin != null) { if (val) { RemoveSpeechPluginListener(); } else { AddSpeechPluginListener(); } } if (textToSpeechPlugin != null && textToSpeechPlugin.isInitialized()) { if (val) { textToSpeechPlugin.UnRegisterBroadcastEvent(); } else { textToSpeechPlugin.RegisterBroadcastEvent(); } } }
private void OnApplicationPause(bool val) { //for text to speech events if (textToSpeechPlugin != null) { if (textToSpeechPlugin.isInitialized()) { if (val) { textToSpeechPlugin.UnRegisterBroadcastEvent(); } else { textToSpeechPlugin.RegisterBroadcastEvent(); } } } }