Is there an Android API analogous to java.awt.Robot, i.e. an API allowing to take screenshots?
-
You need to ask 1 question: http://stackoverflow.com/questions/4416059/how-to-download-some-java-jar-library-files – zengr Dec 11 '10 at 10:21
4 Answers
If you would like to simulate touch events (just like robot does with mouse clicks) use the utility class TouchUtils
.

- 43,066
- 12
- 116
- 140
java.awt.Robot is not available in the Android SDK.
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/Screenshot-Android-71410.shtml
There is also a library available that may be useful for you:
Android Screenshot Library (ASL)
However, there is also a disucssion on SO:

- 1
- 1
Robot
class is only available in Java, this is not supported in Android, Too see what are the classes supported in Android, pls click this

- 3,642
- 3
- 25
- 42

- 11,927
- 11
- 57
- 90
-
-
what's the alternative of Robot in android? I want to make some clicking functionalities. – gumuruh Jul 26 '18 at 06:00
class TouchUtils... This class was deprecated in API level 24. Use Espresso UI testing framework instead. New tests should be written using the Android Testing Support Library.

- 1
- 1