【发布时间】:2013-06-23 04:42:44
【问题描述】:
我想开发一个 AP,通过 WiFi 直接连接将 (SOURCE) 屏幕共享到另一个 (SINK) 设备。
我通过 Wifi direct API 成功连接了两台设备,但 getPresentationDisplay() 返回 null。 SOURCE 设备似乎没有找到 SINK 设备导出的任何附加显示服务。 API 级别 4.2.2 是否支持它?或者是否有任何 API 可以将显示服务注册到 SOURCE?
//Get Media router service
mMediaRouter = (MediaRouter) getSystemService(Context.MEDIA_ROUTER_SERVICE);
MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
if (route != null) {
Display presentationDisplay = route.getPresentationDisplay();
if (presentationDisplay != null) {
Presentation presentation = new DemoPresentation(this, presentationDisplay);
Log.i("tracer", "presentation.show();");
presentation.show();
}
}
【问题讨论】:
-
你能出示你的代码吗?
-
你的意思是像maxivista.com。
-
没那么复杂...我要做的是将SOURCE设备的屏幕内容镜像到SINK设备的屏幕上。
标签: android wifi-direct