1

My goal here is to have at least a minimum of automation for a specific game application. I am basically trying to write an overlay app that performs touch events programmatically based on the current screen of this game.

My approach to the problem is:

a. Take a screenshoot of the screen every few seconds
b. Use image recognition on the screenshot for template matching 
c. Perform touch event programmatically on the returned location of the template matching algorithm
d. Delete screenshot
e. Go to step a

I am not so sure taking screenshots every few seconds and doing template matching is the "best" approach though. Is there maybe any other way to avoid taking screenshots?

What do you think? Have any suggestions?

Cœur
  • 37,241
  • 25
  • 195
  • 267
DeborahAnn
  • 191
  • 1
  • 11
  • Are you writing the game yourself? If yes, can't you use the internal state of the game instead of making screenshots? – Michiel Nov 12 '19 at 11:44
  • No, I am not writing the game myself. – DeborahAnn Nov 12 '19 at 11:52
  • Step a. and b. are for sure feasible, where b. is the most error prone. I'd start with checking out if performing touch events is allowed and possible from a Service, or that you need adb and/or a rooted device. – Michiel Nov 12 '19 at 11:57

0 Answers0