{"action":"created","issue":{"url":"https://api.github.com/repos/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8","labels_url":"https://api.github.com/repos/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8/comments","events_url":"https://api.github.com/repos/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8/events","html_url":"https://github.com/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8","id":53102639,"number":8,"title":"Multiple Disconnects When Resuming WebApp","user":{"login":"wthomsen","id":3750664,"avatar_url":"https://avatars.githubusercontent.com/u/3750664?v=3","gravatar_id":"","url":"https://api.github.com/users/wthomsen","html_url":"https://github.com/wthomsen","followers_url":"https://api.github.com/users/wthomsen/followers","following_url":"https://api.github.com/users/wthomsen/following{/other_user}","gists_url":"https://api.github.com/users/wthomsen/gists{/gist_id}","starred_url":"https://api.github.com/users/wthomsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wthomsen/subscriptions","organizations_url":"https://api.github.com/users/wthomsen/orgs","repos_url":"https://api.github.com/users/wthomsen/repos","events_url":"https://api.github.com/users/wthomsen/events{/privacy}","received_events_url":"https://api.github.com/users/wthomsen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"khk624","id":5640432,"avatar_url":"https://avatars.githubusercontent.com/u/5640432?v=3","gravatar_id":"","url":"https://api.github.com/users/khk624","html_url":"https://github.com/khk624","followers_url":"https://api.github.com/users/khk624/followers","following_url":"https://api.github.com/users/khk624/following{/other_user}","gists_url":"https://api.github.com/users/khk624/gists{/gist_id}","starred_url":"https://api.github.com/users/khk624/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khk624/subscriptions","organizations_url":"https://api.github.com/users/khk624/orgs","repos_url":"https://api.github.com/users/khk624/repos","events_url":"https://api.github.com/users/khk624/events{/privacy}","received_events_url":"https://api.github.com/users/khk624/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2014-12-30T09:14:13Z","updated_at":"2015-06-05T13:32:24Z","closed_at":"2015-01-20T02:20:25Z","body":"I'm trying to implement basic resume functionality with a Chromecast webApp:\r\n\r\n```\r\n// First try to join an active web app without launching/relaunching\r\nwebAppLauncher.joinWebApp(webAppId).success(function (webAppSession) {\r\n  openCommunicationChannel(webAppSession);\r\n}).error(function () {\r\n  // If joining fails, launch instead\r\n  webAppLauncher.launchWebApp(webAppId).success(function (webAppSession) {\r\n    openCommunicationChannel(webAppSession);\r\n  }).error(function (err) {\r\n    console.log('web app launch error: ' + err.message);\r\n  });\r\n});\r\n```\r\n\r\nWhen following:\r\n1. launch webApp\r\n2. kill sender app\r\n3. re-open sender app and join webApp\r\n\r\nThe join succeeds, but the receiver logs two separate depart (sender disconnection) events, with a join in-between. I believe it is related to https://github.com/ConnectSDK/Connect-SDK-Android-Google-Cast/commit/97fabe8f47a3908d51d70a4060933e48ca97238e, in particular, the addition of `Cast.CastApi.leaveApplication(service.getApiClient());`. When commenting out that line everything works as expected.\r\n\r\nWhat am I missing? Should I somehow be resetting the castServiceChannel before the join, or do I need a new approach entirely?"},"comment":{"url":"https://api.github.com/repos/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/comments/109293474","html_url":"https://github.com/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8#issuecomment-109293474","issue_url":"https://api.github.com/repos/ConnectSDK/Connect-SDK-Cordova-Plugin/issues/8","id":109293474,"user":{"login":"LukePulverenti","id":3607463,"avatar_url":"https://avatars.githubusercontent.com/u/3607463?v=3","gravatar_id":"","url":"https://api.github.com/users/LukePulverenti","html_url":"https://github.com/LukePulverenti","followers_url":"https://api.github.com/users/LukePulverenti/followers","following_url":"https://api.github.com/users/LukePulverenti/following{/other_user}","gists_url":"https://api.github.com/users/LukePulverenti/gists{/gist_id}","starred_url":"https://api.github.com/users/LukePulverenti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukePulverenti/subscriptions","organizations_url":"https://api.github.com/users/LukePulverenti/orgs","repos_url":"https://api.github.com/users/LukePulverenti/repos","events_url":"https://api.github.com/users/LukePulverenti/events{/privacy}","received_events_url":"https://api.github.com/users/LukePulverenti/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T13:32:24Z","updated_at":"2015-06-05T13:32:24Z","body":"Having done more testing, I am unable to receive the same messages in android that I am in iOS. I made the code changes to the plugin, and made sure to call setWebAppSessionListener. Is there a known issue with this?"}}