lihaosky / google-cast-sdk

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

Android: Custom data channel stays connected in background app, but no messages received #330

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use Cast Companion Library, with a custom data channel open with the receiver
2. App goes to background (i.e. home button, screen lock, etc)
3. Send a message from receiver to the Android sender app

What is the expected output? What do you see instead?
I would expect that the onMessageReceived callback inside DataCastConsumerImpl 
will be called with the message, but it cannot since the Activitiy is in the 
paused or stopped state. Thus, I would expect that the data channel be 
disconnected - but it is not. This is a big pain, because it means that the app 
cannot rely on the data channel as being reliable, and it is up to the 
developer to write additional code to make sure messages do not get lost. I 
suggest the Android implementation follows the iOS Cast SDK, and the data 
channel be disconnected when the app is in the background.

What version of the product are you using? On what operating system?
Android 4.1.2, CCL 1.8, Google Play Services 5.0 installed on the device

Please provide any additional information below.

Original issue reported on code.google.com by mokesmo...@gmail.com on 16 Jul 2014 at 3:01

GoogleCodeExporter commented 9 years ago
You need to write a sample with SDK, this issue tracker is for SDK issues.

Original comment by anad...@google.com on 16 Jul 2014 at 3:05