Eclipse Android DDMS如何实现“屏幕截图” [英] How Eclipse android DDMS implement "screen capture"

查看:132
本文介绍了Eclipse Android DDMS如何实现“屏幕截图”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道eclipse Android DDMS如何实现屏幕截图?



更新:



因为我想要捕获整个Android设备屏幕哪个运行的应用程序使用android谷歌地图v2。如果应用程序使用Android google map v1,可以捕捉截图。但是如果使用android goole map v2,它会返回黑屏。



您可以从黑屏



但是我可以捕获截图甚至Android谷歌地图v2)从DDMS。这就是为什么我想知道DDMS如何捕获截图的原因。



看起来像DDMS通过 / system / bin / screencap / system / bin / screenshot ,但似乎需要root权限。

解决方案

我想你可以在 com.android.ddmuilib.ScreenShotDialog 代码中找到答案。



首先,获取源代码:

  git clone https://android.googlesource.com/platform/ sdk 

DDMS来源: sdk / ddms



ScreenShotDialog: sdk / ddms / libs / ddmuilib / ...



(或直接 here


Does anyone know how eclipse android DDMS implement "screen capture"?

Update:

Because I want to capture the whole android device screen which running the app using android google map v2. If the app using android google map v1, it's ok to capture the screenshot. But it return a black screen if using android goole map v2.

Uou can see the issue from black screen

But I can capture the screenshot(even android google map v2) from DDMS. That's the reason why I wanna know how DDMS capture screenshot.

Look like DDMS get screenshot via /system/bin/screencap or /system/bin/screenshot, but it seems to need the "root" authority.

解决方案

I think you can find your answer in the com.android.ddmuilib.ScreenShotDialog code.

First, get the source code :

git clone https://android.googlesource.com/platform/sdk

DDMS sources in: sdk/ddms

ScreenShotDialog in: sdk/ddms/libs/ddmuilib/ ...

(or directly here)

这篇关于Eclipse Android DDMS如何实现“屏幕截图”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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