本文整理汇总了Java中com.google.android.gms.cast.CastRemoteDisplayLocalService类的典型用法代码示例。如果您正苦于以下问题:Java CastRemoteDisplayLocalService类的具体用法?Java CastRemoteDisplayLocalService怎么用?Java CastRemoteDisplayLocalService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CastRemoteDisplayLocalService类属于com.google.android.gms.cast包,在下文中一共展示了CastRemoteDisplayLocalService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startVideoCast
import com.google.android.gms.cast.CastRemoteDisplayLocalService; //导入依赖的package包/类
public void startVideoCast(boolean isManualSwitch) {
CastDebug.log("startVideoCast");
if(isManualSwitch)
mForceLocalResume = true;
if(mVideoTask !=null)
mVideoTask.cancel(true);
mVideoTask = null;
if(!VideoCastManager.getInstance().isConnected()&&ArchosVideoCastManager.getInstance().getSelectedRoute()!=null){
mStartOnConnect = true;
if(mApiClient!=null&&mApiClient.isConnected()) {
CastDebug.log("disconnecting remote display");
Log.d(TAG, "disconnecting remote display");
ArchosVideoCastManager.getInstance().setIsSwitching(true);
ArchosVideoCastManager.getInstance().stopProgressTimer();
CastRemoteDisplayLocalService.stopService();
}
else
connectVideoPlayer();
}else {
startVideo();
}
}
示例2: onRouteUnselected
import com.google.android.gms.cast.CastRemoteDisplayLocalService; //导入依赖的package包/类
@Override
public void onRouteUnselected(MediaRouter router, MediaRouter.RouteInfo info) {
if (isRemoteDisplaying()) {
CastRemoteDisplayLocalService.stopService();
}
castDevice = null;
}
示例3: onCurrentPageChange
import com.google.android.gms.cast.CastRemoteDisplayLocalService; //导入依赖的package包/类
@Override
public void onCurrentPageChange(int position) {
currentPosition = position;
if (CastRemoteDisplayLocalService.getInstance() != null) {
((PresentationService) CastRemoteDisplayLocalService.getInstance()).setAdViewModel(
fragmentStatePagerAdapter.getAdAt(position));
}
}
示例4: teardown
import com.google.android.gms.cast.CastRemoteDisplayLocalService; //导入依赖的package包/类
void teardown() {
try {
CastRemoteDisplayLocalService.stopService();
hdmi.dismiss();
} catch (Exception e) {
// Ooops
}
logoButton_isSelected = false;
noSecondScreen();
}
示例5: isRemoteDisplaying
import com.google.android.gms.cast.CastRemoteDisplayLocalService; //导入依赖的package包/类
private boolean isRemoteDisplaying() {
return CastRemoteDisplayLocalService.getInstance() != null;
}