for my project i need to do the following thing,
- get device touch event from adb getevent command.
- and at the same time i need to find something that collects the information of the application activity calls.
my goal is to find out upon each touch information if there is a change in activity in a particular app, detect that activity.
So, whenever a touch at (x,y) position happens getevent reports that, now if there is a button on that position it may call an activity change in the app, so i need to detect the change to new activity.
How this can be done? any idea?
You can try this in a python script:
With monkeyrunner you can also click/ press on buttons using (x,y) coordinates.
Another way would be to look in the logcat output for activity changes. It should look like this: Displayed com.android.gallery3d/.app.MovieActivity whyen playing a video file from gallery.
Later edit:
You can use 'am.current.package' and 'am.current.action' to see the changes in the activities. You can use:
to catch the click/ touch events. All in the same script.