Task <bool> Initialize() { if (tcsInitialize != null && tts != null) { return(tcsInitialize.Task); } tcsInitialize = new TaskCompletionSource <bool>(); try { // set up the TextToSpeech object tts = new AndroidTextToSpeech(Platform.AppContext, this); #pragma warning disable CS0618 tts.SetOnUtteranceCompletedListener(this); #pragma warning restore CS0618 } catch (Exception e) { tcsInitialize.SetException(e); } return(tcsInitialize.Task); }