include method to find application standby state
This commit is contained in:
parent
b1f62b56cd
commit
94af4763d2
|
@ -386,6 +386,11 @@ public class CastManager extends BaseCastManager implements OnFailedListener {
|
||||||
return remoteMediaPlayer.getApproximateStreamPosition();
|
return remoteMediaPlayer.getApproximateStreamPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getApplicationStandbyState() throws IllegalStateException {
|
||||||
|
Log.d(TAG, "getApplicationStandbyState()");
|
||||||
|
return Cast.CastApi.getStandbyState(mApiClient);
|
||||||
|
}
|
||||||
|
|
||||||
private void onApplicationDisconnected(int errorCode) {
|
private void onApplicationDisconnected(int errorCode) {
|
||||||
Log.d(TAG, "onApplicationDisconnected() reached with error code: " + errorCode);
|
Log.d(TAG, "onApplicationDisconnected() reached with error code: " + errorCode);
|
||||||
mApplicationErrorCode = errorCode;
|
mApplicationErrorCode = errorCode;
|
||||||
|
@ -1448,6 +1453,7 @@ public class CastManager extends BaseCastManager implements OnFailedListener {
|
||||||
mediaStatus = remoteMediaPlayer.getMediaStatus();
|
mediaStatus = remoteMediaPlayer.getMediaStatus();
|
||||||
if (mediaStatus == null) {
|
if (mediaStatus == null) {
|
||||||
Log.d(TAG, "MediaStatus is null, so will not proceed");
|
Log.d(TAG, "MediaStatus is null, so will not proceed");
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
List<MediaQueueItem> queueItems = mediaStatus.getQueueItems();
|
List<MediaQueueItem> queueItems = mediaStatus.getQueueItems();
|
||||||
if (queueItems != null) {
|
if (queueItems != null) {
|
||||||
|
|
Loading…
Reference in New Issue