Giter Site home page Giter Site logo

android-auto-clicker's Introduction

Auto-Clicker and Screen-Capturer

It is a program made to experiment with Android's adb commands.

Purpose

The intention of the app is to create a helper for my mom to use a company app more easily, by doing the monitoring and clicking by the app, instead of human, hoping that the app will run faster than human nerve system (~200 ms). However, certain commands that do the core functions are too slow (~3000 ms for screen capture and ~600 ms for clicking). So the project is abandoned due to this performance issue.

Mechanism

The mechanism of the program is as follows:

  • monitor the screen at a constant rate by taking screenshots using
    /system/bin/screencap -p /sdcard/autoClicker/img.png
  • then examinate a certain pixel of the taken screenshot.
  • If that very pixel is the desired color, then do a rapid click at a certain point using
    /system/bin/input tap x y (where x y being the coordinates).

Even the idea of making this app into an auto-clicker is cannot be implimented due to the performance issue mentioned above.

Here's a screenshot of the app:

What I learnt

However, much new knowledge are gained through this project:

  • this code can be used to run adb shell commands on a rooted android device: Process sh = Runtime.getRuntime().exec("su", null, null);
    OutputStream os = sh.getOutputStream();
    os.write((/* command */).getBytes("ASCII"));
    os.flush();
    os.close();
    sh.waitFor();

  • mechanism behind floating window

  • how to include .jar file/library in Android Studio:

android {
...
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}
  • also this app prompted me to start learning android from coursera

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.