I am trying to write an example RemotePlaybackClient application, partly because the one published by Google fails aapt .
I can get RemotePlaybackClient to support play() , and it plays the video on Chromecast.
However, when I call stop() to stop the video from playing while Chromecast stops playing (it displays a black screen with a centered icon), the SessionActionCallback that I pass to the stop() call is not called using onResult() :
private void stop() { logToTranscript(getActivity().getString(R.string.stop_requested)); SessionActionCallback stopCB=new SessionActionCallback() { @Override public void onResult(Bundle data, String sessionId, MediaSessionStatus sessionStatus) { logToTranscript(getActivity().getString(R.string.stopped)); isPlaying=false; isPaused=false; getActivity().supportInvalidateOptionsMenu(); endSession(); } }; client.stop(null, stopCB); }
The same thing happens if I try to execute pause() - the SessionActionCallback passed to pause() is not called.
A sample code posted by Google shows that these callbacks should be called, but again, I cannot get this to successfully compile.
Does anyone know under what circumstances SessionActionCallback will not work, and ItemActionCallback used with play() will work?
UPDATE
I registered number 66996 and issue 67032 , the last of which is, in particular, a problem, I see here when I encounter this problem with an official example application.
android chromecast google-cast
CommonsWare Mar 11 '14 at 16:38 2014-03-11 16:38
source share