lihaosky / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

When Chromecast device goes offline, the device scanner's devices array property still contains the device #410

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run app with a GCKDeviceScanner set up on a local network with a Chromecast 
device
2. Wait until the app discovers the device
3. Disconnect from the network, e.g. by disabling Wifi and going to 3G/4G

What is the expected output? What do you see instead?

The expected output is that when the device goes offline the GCKDeviceScanner's 
devices array property is empty. The GCKDeviceScanner's hasDiscoveredDevices 
boolean correctly returns false, but the device is still in the devices array.

What version of the product are you using? On what operating system?

I am running the iOS sender SDK (version 2.4 1210) on iOS 8.0.2.

Original issue reported on code.google.com by marcus.m...@gmail.com on 17 Oct 2014 at 10:27

GoogleCodeExporter commented 9 years ago
Specifically, the self.deviceScanner.devices is not empty when its delegate 
method, deviceDidGoOffline:, is called.

Original comment by marcus.m...@gmail.com on 17 Oct 2014 at 10:28

GoogleCodeExporter commented 9 years ago
As a workaround, you can defer updating whatever objects you need to update 
until the next run loop (which is when all status updates should have been 
applied and self.deviceScanner.devices will have returned the correct value). 
You can do this by calling performSelector:withObject:afterDelay inside 
deviceDidGoOffline.

Original comment by christia...@google.com on 21 Oct 2014 at 5:10

GoogleCodeExporter commented 9 years ago
This is fixed in the upcoming SDK release.

Original comment by mlind...@google.com on 20 Nov 2014 at 2:12

GoogleCodeExporter commented 9 years ago
The new release is now available. For release notes, please refer to this page: 
https://developers.google.com/cast/docs/release-notes

Original comment by christia...@google.com on 2 Dec 2014 at 9:52