我正在使用chromecast将信息投射到电视屏幕上。 成功注册该应用程序和chromecast设备本身之后,我成功地连接到电视并使用带有api 27的手机投射数据。同时,我无法使用同一应用程序通过平板电脑连接到电视。平板电脑安装了api 19,并且我已经安装了非官方的api 27安卓系统,但也没有成功。
手机和桌子都可以使用Youtube等标准应用成功投射所有内容。
当我使用平板电脑时,调用函数CastRemoteDisplayLocalService.startService并调用onRemoteDisplaySessionError时会发生错误。几秒钟后,电视屏幕变黑,但平板电脑向我显示一条消息,提示连接已断开。
这是我得到的日志:
D / MainActivity:onRouteSelected D / Rasul:CreatedPresentation0
V / MediaRouter:调度路由更改:UserRouteInfo {name = Bedroom TV,description = Chromecast,status = null,category = RouteCategory {name = Devices types = ROUTE_TYPE_USER groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = null} < / p>
V / MediaRouter:调度路由更改:UserRouteInfo {name = Bedroom TV,description = Chromecast,status = null,category = RouteCategory {name = Devices types = ROUTE_TYPE_USER groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = null} < / p>
V / MediaRouter:调度路由更改:UserRouteInfo {name = Bedroom TV,description = Chromecast,status = null,category = RouteCategory {name = Devices types = ROUTE_TYPE_USER groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = null} < / p>
V / MediaRouter:调度路由更改:UserRouteInfo {name = Bedroom TV,description = Chromecast,status = null,category = RouteCategory {name = Devices types = ROUTE_TYPE_USER groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = null} < / p>
V / MediaRouter:调度路由更改:UserRouteInfo {name = Bedroom TV,description = Chromecast,status = null,category = RouteCategory {name = Devices types = ROUTE_TYPE_USER groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = null} < / p>
调度路线更改:UserRouteInfo {名称=卧室电视,描述= Chromecast,状态=空,类别= RouteCategory {名称=设备类型= ROUTE_TYPE_USER组able = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay =空} W / CastRemoteDisplayLocalService:[实例:com.google.android.gms.cast.CastRemoteDisplayLocalService$10@b44de89] ConnectionSuspended 1 I / MediaRouter:取消选择当前路由,因为它不再可选:MediaRouter.RouteInfo {uniqueId = com.google.android.gms / .cast .media.CastMediaRouteProviderService:1cc4d2c9976ead58a32b1075cdd51184,名称=卧室电视,描述= Chromecast,iconUri =空,已启用= true,连接= false,connectionState = 2,canDisconnect = false,播放类型= 1,播放流= -1,设备类型= 1,音量处理= 1,volume = 20,volumeMax = 20,presentationDisplayId = -1,extras = Bundle [mParcelledData.dataSize = 868],settingsIntent = null,providerPackageName = com.google.android.gms}
E / CastRemoteDisplayLocalService:连接失败\
E / CAST:结果-空
E / CastRemoteDisplayLocalService:由于API客户端尚未准备就绪,无法停止远程显示
V / MediaRouter:选择路由:RouteInfo {名称=平板电脑,描述=空,状态=空,类别= RouteCategory {名称=空类型= ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO groupable = false},supportedTypes = ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_Display_VIDE / MediaRouter:调度路线更改:UserRouteInfo {name = Bedroom TV,description = Chromecast,status = null,category = RouteCategory {name = Devices types = ROUTE_TYPE_USER groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = NULL}
移除路线:UserRouteInfo {名称=卧室电视,说明= Chromecast,状态=空,类别= RouteCategory {名称=设备类型= ROUTE_TYPE_USER,groupable = false},supportedTypes = ROUTE_TYPE_USER,presentationDisplay = null
我真的不知道下一步该怎么做。甚至有可能吗?