如何Eclipse中的Andr​​oid DDMS实施"屏幕捕获" [英] How Eclipse android DDMS implement "screen capture"

查看:113
本文介绍了如何Eclipse中的Andr​​oid DDMS实施"屏幕捕获"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道的Andr​​oid DDMS如何月食实现截屏?

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

更新:

由于我想捕捉使用Android的谷歌地图V2它运行的应用程序的整个Android设备的屏幕。如果应用程序使用的Andr​​oid谷歌地图第一版,它的确定捕获的屏幕截图。但是,如果采用了android古尔图V2返回黑屏。

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可以看到从<一个问题href="http://stackoverflow.com/questions/13773658/capture-screen-shot-of-googlemap-android-api-v2/14725103#14725103">black屏幕

不过,我可以捕捉从DDMS截图(甚至是Android的谷歌地图V2)。这就是为什么我想知道如何DDMS捕捉屏幕截图的原因。

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.

看起来像DDMS得到截图通过 /系统/斌/ screencap /系统/斌/截图,但它似乎需要根权限。

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

推荐答案

我认为你可以找到你的答案 com.android.ddmuilib.ScreenShotDialog code

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

首先,获取源$ C ​​$ C:

First, get the source code :

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

在DDMS来源: SDK / DDMS

ScreenShotDialog在: SDK / DDMS /库/ ddmuilib / ...

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

(或直接<一href="http://www.netmite.com/android/mydroid/cupcake/development/tools/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java"相对=nofollow>这里)

这篇关于如何Eclipse中的Andr​​oid DDMS实施&QUOT;屏幕捕获&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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