如何通过IP访问DDMS的截屏功能
寻找一个程序,或者,如果它不存在,则寻找一种通过输入设备的 IP 地址来捕获基于 Android 的设备(专有触摸遥控器)屏幕的方法。
任何人都知道可以为我做这件事的东西,或者如果不知道,我可能需要做什么来打包可以做到这一点的东西?
Looking for a program, or, if it doesn't exist, a way to capture the screen of an Android-based device (proprietary touch-remotes) by entering the IP address of the device.
Anyone know of something that could do this for me or, if not, what I might need to do to package up something that could do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
实际上,“屏幕捕获”功能内置于 Android 本身中 - DDMS 只是调用它。
这将相当简单:
a) 编写一个 Android 服务,
b) 监听端口,并且
c) 在调用时执行自己的屏幕捕获。
以下是以编程方式进行屏幕捕获的示例:
将 Webview 内容放入位图
Android 屏幕截图和屏幕截图
Actually, the "screen capture" capability is built into Android itself - DDMS simply invokes it.
It would be fairly straightforward to:
a) write an Android service, that
b) listens on a port, and
c) does its own screen capture when invoked.
Here's an example for programmatically doing a screen capture:
Get Webview content into bitmap
Android Screenshots and Screen Capture
您可以使用类似 Wifi ADB 的内容来设置 ADB 连接无线上网。然后应该可以使用使用 DDMS 的设备获取屏幕截图。
You could use something like Wifi ADB to setup an ADB connection over Wifi. It should then be possible to get the screen shot using the device using DDMS.
编辑:实际上,我最终编写了一个简单的 C++ 程序,该程序在控制台窗口中请求 IP 地址,使用输入的 IP 地址执行命令“adb connect”,从而通过 ADB 与指定 IP 地址的设备建立连接,然后C++程序启动“Droid@Screen”软件。由于 ADB 已经启动,程序将简单地显示来自 ADB 的任何内容!我感觉其他第三方程序也能工作。
EDIT: Actually, I ended up writing a simple C++ program that asks for an IP address in a console window, does command "adb connect " with the input IP address, thus establishing a connection via ADB to a device at a specified IP address, and then the C++ program starts up "Droid@Screen" software. Since the ADB is already started, the program will simply display whatever is coming in from the ADB! I have a feeling other 3rd party programs would work too.