//onPause is called when the app is sent to the background
        protected override void OnPause()
        {
            base.OnPause();

            //When the app is moved to the background, unregister the typing indicator
            if (layerClient != null && conversationView != null)
            {
                layerClient.UnregisterTypingIndicator(conversationView);
            }
        }