问题描述
有一个Android API类似于java.awt.Robot中,即一个API,允许采取截图?
Is there an Android API analogous to java.awt.Robot, i.e. an API allowing to take screenshots?
推荐答案
java.awt.Robot中是在Android SDK中不具备的。
java.awt.Robot is not available in the Android SDK.
如果你想用自己的截图在开发过程中,你可以使用DDMS。如果您的应用程序应该截图,我觉得这需要根。有应用程序,可以做到这一点,例如。
If you want to make screenshots by your own during development you can use DDMS. If your application should make screenshots, I think this requires root. There are application that can do that, e.g.
http://handheld.softpedia.com/get/Others/截图 - Android的71410.shtml
还有可用的库,可能对您有用:
There is also a library available that may be useful for you:
然而,也有disucssion对SO:
However, there is also a disucssion on SO:
How捕捉到Android设备屏幕上的内容?
这篇关于像java.awt.Robot中的Android API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!