public override void OnDestroy() { base.OnDestroy(); Activity.UnregisterReceiver(receiver); if (chatService != null) { chatService.Stop(); } }