Android screen sharing programmatically (Root)

ⅰ亾dé卋堺 提交于 2019-12-06 21:53:30

问题


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

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


回答1:


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

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:

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.

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.

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.

Please see http://developer.android.com/guide/topics/media/mediarouter.html for further details



来源:https://stackoverflow.com/questions/37052113/android-screen-sharing-programmatically-root

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!