App Automation - Image recognition

I am trying to make a android app that automates a popular game.
Example of what i have done in Ankulua is in the link below, but now i want to do the same in java / Kotlin / c++ etc android app
(So i can have a separate app instead of running a script through another app)

I am facing a couple of problems:

  1. How do i recognize a image that comes onto the screen, and get its coordinates?
  2. How do i click and drag on the game screen ?

Any help pointing me in the right direction would be appreciated :slight_smile:

Video :