void DidConnectToCastApplication (GCKDeviceManager deviceManager, GCKApplicationMetadata applicationMetadata, string sessionId, bool launchedApplication) { Console.WriteLine("application name: {0}, sessionId: {1}, wasLaunched: {2}", applicationMetadata.ApplicationName, sessionId, launchedApplication); _channel = new MyChannel { OnDidReceiveTextMessage = DidReceiveTextMessage }; _deviceManager.AddChannel (_channel); _applicationStarted = true; UpdateButtonStates (); textName.BecomeFirstResponder (); }
void DeviceDisconnected() { _applicationStarted = false; _hasJoined = false; _channel.Dispose (); _channel = null; _deviceManager.Dispose (); _deviceManager = null; _selectedDevice.Dispose (); _selectedDevice = null; }