当前位置: 首页>>代码示例>>Java>>正文


Java CastRemoteDisplayLocalService类代码示例

本文整理汇总了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();
    }
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:23,代码来源:CastService.java

示例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;
}
 
开发者ID:ferranpons,项目名称:android-cast-remote-display-sample,代码行数:8,代码来源:MainActivity.java

示例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));
  }
}
 
开发者ID:ferranpons,项目名称:android-cast-remote-display-sample,代码行数:9,代码来源:MainActivity.java

示例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();
}
 
开发者ID:thebigg73,项目名称:OpenSongTablet,代码行数:11,代码来源:PresenterMode.java

示例5: isRemoteDisplaying

import com.google.android.gms.cast.CastRemoteDisplayLocalService; //导入依赖的package包/类
private boolean isRemoteDisplaying() {
  return CastRemoteDisplayLocalService.getInstance() != null;
}
 
开发者ID:ferranpons,项目名称:android-cast-remote-display-sample,代码行数:4,代码来源:MainActivity.java


注:本文中的com.google.android.gms.cast.CastRemoteDisplayLocalService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。