{"action":"opened","issue":{"url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/159","labels_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/159/comments","events_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/159/events","html_url":"https://github.com/googlecast/CastCompanionLibrary-android/issues/159","id":64551820,"number":159,"title":"com.google.sample.castcompanionlibrary.cast.exceptions.NoConnectionException:","user":{"login":"mntgoat","id":1638377,"avatar_url":"https://avatars.githubusercontent.com/u/1638377?v=3","gravatar_id":"","url":"https://api.github.com/users/mntgoat","html_url":"https://github.com/mntgoat","followers_url":"https://api.github.com/users/mntgoat/followers","following_url":"https://api.github.com/users/mntgoat/following{/other_user}","gists_url":"https://api.github.com/users/mntgoat/gists{/gist_id}","starred_url":"https://api.github.com/users/mntgoat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mntgoat/subscriptions","organizations_url":"https://api.github.com/users/mntgoat/orgs","repos_url":"https://api.github.com/users/mntgoat/repos","events_url":"https://api.github.com/users/mntgoat/events{/privacy}","received_events_url":"https://api.github.com/users/mntgoat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-26T15:11:55Z","updated_at":"2015-03-26T15:11:55Z","closed_at":null,"body":"Why do I get NoConnectionException if my code looks like this:\r\n\r\n```\r\nif (castManager.isConnected()) {\r\n         return (int) (castManager.getVolume() * 100);\r\n}\r\n```\r\n\r\nIt is the most reported exception I have on crashlytics. I am catching so the app isn't crashing but still seems odd. Surely the user ins't getting disconnected between the check of isConnected and the getting of the volume?\r\n\r\n```\r\ncom.google.sample.castcompanionlibrary.cast.exceptions.NoConnectionException: getDeviceVolume()\r\n       at com.google.sample.castcompanionlibrary.cast.BaseCastManager.getDeviceVolume(BaseCastManager.java:607)\r\n       at com.google.sample.castcompanionlibrary.cast.VideoCastManager.getVolume(VideoCastManager.java:615)\r\n```\r\n"}}