Handle GoogleApiClient disconnect() |
||||||||||||||||
Issue descriptionUpon offline discussion with Prameet we discovered that Cast code in Clank doesn't handle GoogleApiClient being disconnected which corresponds to network disconnect from Chromecast so onApplicationStopped won't get called.
,
Nov 16 2016
+Bin who has been working on connection states.
,
Nov 16 2016
,
Nov 23 2016
,
Dec 1 2016
,
Dec 1 2016
,
Dec 8 2016
,
Dec 8 2016
,
Dec 8 2016
,
Feb 9 2017
Ping Anton; is this still something we need in M57?
,
Feb 15 2017
Re: Comment 1 There's no "suspended" state in the Presentation API. If the message cannot be delivered the connection fires an error event and enters a terminal error state. The page will need to reconnect when the network is available. The MRP could decide to implement queueing/retries and keep the connection "connected" even if it really isn't, but that leads to weird behaviors like a pause command getting sent minutes after the user gesture, so I wouldn't recommend it. Moving to the backlog as it looks like this won't be done for M57.
,
Feb 15 2017
So the resolution is to report the connection as "disconnected" then? That'd be easier to implement then queuing the messages until the connection is restored while maybe degrading the UX. Do we know if these intermittent failures happen often during a typical session and how often and how fast they recover? To avoid weird behaviors we could queue the commands for a few seconds and then report disconnection, for example. +Shen whose team would fix this.
,
Feb 15 2017
There's no "disconnected." The connection would transition to "closed" with a closeReason of "error". https://w3c.github.io/presentation-api/#interface-presentationconnectioncloseevent I misspoke about the error event. That has been replaced by closeReason = error.
,
Feb 15 2017
If the SDK wants to craft some specific behavior for a connection in a suspended state, i.e. queue on the page side and reconnect later, they could set a specific message for the close event.
,
Sep 29 2017
,
Sep 29 2017
,
Aug 2
,
Aug 2
,
Jan 11
|
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by avayvod@chromium.org
, Nov 16 2016