Android API e.g. java.awt.Robot

Is there an Android API similar to java.awt.Robot, i.e. Screenshot API?

+7
java android
source share
3 answers

java.awt.Robot is not available in the Android SDK.

If you want to take screenshots yourself during development, you can use DDMS. If your application needs to take screenshots, I think that this requires root. There is an application that can do this, for example.

http://handheld.softpedia.com/get/Others/Screenshot-Android-71410.shtml

There is also a library that may be useful to you:

Android Screenshot Library (ASL)

However, there is a discrepancy in SO:

How to capture the screen contents of an Android device?

+3
source share

If you want to simulate touch events (as the robot does with the mouse), use the TouchUtils utility TouchUtils .

+7
source share

Robot class is available only in Java, it is not supported in Android. Also see what is supported on Android. Pls click http://developer.android.com/reference/packages.html

0
source share

All Articles