以编程方式共享Android屏幕(根) [英] Android screen sharing programmatically (Root)

查看:168
本文介绍了以编程方式共享Android屏幕(根)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过root adb shell进行屏幕共享,而无需用户通过Android> = 5中的mircast或chromecast进行用户交互?

Is it possible to screen sharing from root adb shell without user interaction over mircast or chromecast in Android >= 5?

我正在寻找启用/禁用此>://的命令support.google.com/nexus/answer/2865484?hl=zh_CN

I'm looking for the command that enables/disables this https://support.google.com/nexus/answer/2865484?hl=en

推荐答案

您可以尝试使用Android SDK中的媒体路由器-辅助输出 API:

You can try the Media Router - Secondary Output APIs from Android SDK:

Android媒体路由器API旨在在这些辅助设备上启用媒体显示和播放.您可以使用两种主要方法来使用这些API播放内容:

The Android media router APIs are designed to enable media display and playback on these secondary devices. There are two main approaches you can use to play content using these APIs:

远程播放-这种方法使用接收设备来处理内容数据的检索,解码和播放,而用户手中的Android设备用作遥控器.支持Google Cast的Android应用程序使用这种方法.

Remote Playback — This approach uses the receiving device to handle the content data retrieval, decoding, and playback, while an Android device in the user's hand is used as a remote control. This approach is used by Android apps that support Google Cast.

次要输出-使用这种方法,您的应用可以将视频或音乐直接检索,渲染并将其流式传输到接收设备.这种方法用于支持Android上的无线显示输出.

Secondary Output — With this approach, your app retrieves, renders and streams video or music directly to the receiving device. This approach is used to support Wireless Display output on Android.

辅助输出方法将准备的媒体内容发送到连接的辅助设备进行播放.辅助设备可以包括电视或无线声音系统,并且可以通过无线协议或电线(例如HDMI电缆)连接.通过这种方法,您的应用程序负责处理媒体内容以进行播放(下载,解码,音频和视频轨道的同步),而辅助设备仅以最终形式输出内容.

The secondary output approach sends prepared media content to a connected secondary device for playback. Secondary devices can include televisions or wireless sound systems and can be attached through wireless protocols or wires, such as an HDMI cable. With this approach, your app is responsible for processing media content for playback (downloading, decoding, synchronization of audio and video tracks), while the secondary device only outputs the content in its final form.

请参阅 http://developer.android.com/guide/topics/media/mediarouter.html 了解更多详情

这篇关于以编程方式共享Android屏幕(根)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆