/// <summary>
        /// Invoked when the InAppService is disconnected
        /// </summary>
        /// <param name="name"></param>
        public void OnServiceDisconnected(ComponentName name)
        {
            this.Connected = false;
            Utils.LogDebug("InAppService disconnected.");

            //The following will get re-initialized in OnServiceConnected
            if (this.InAppService != null)
            {
                InAppService.Dispose();
                InAppService = null;
            }

            if (m_listener != null)
            {
                m_listener.Disconnected();
            }
        }
        /// <summary>
        /// Dispose of all un-managed resources and unbind the service connection
        /// </summary>
        /// <param name="disposing"></param>
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            Utils.LogDebug("Disposing.");

            if (MainContext != null)
            {
                MainContext.UnbindService(this);
            }

            if (this.InAppService != null)
            {
                InAppService.Dispose();
                InAppService = null;
            }

            if (m_listener != null && this.Connected)
            {
                m_listener.Disconnected();
            }

            this.Connected = false;
        }