com.amos.flyinn.summoner

## Class Daemon

- java.lang.Object
- - com.amos.flyinn.summoner.Daemon

-     public class Daemon
      extends java.lang.Object

  Handles deployment of the fakeinputlib package. fakeinputlib is a separate java binary which is run with adb debugging permissions to allow injection of input events into other applications. This daemon controls copying the fakeinputlib binary to a specified location and its execution over adb over network.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Daemon(android.content.Context context, java.lang.String addr, android.graphics.Point screenDimensions)` Create a new Daemon instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `spawn_adb()` Start ADBService, which will call fakeinputlib on commandline.
    `void` | `writeFakeInputToFilesystem()` Copy fakeinputlib binary from APK to local directory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Daemon

          public Daemon(android.content.Context context,
                        java.lang.String addr,
                        android.graphics.Point screenDimensions)

      Create a new Daemon instance.
      Parameters:
        `context` - Application context. Used to get application binary.
        `addr` - Server address. This will be passed as a commandline argument to the fakeinputlib binary.
        `screenDimensions` - Screen size including status bar and navbar.

  - ### Method Detail

    - #### writeFakeInputToFilesystem

          public void writeFakeInputToFilesystem()
                                          throws java.io.IOException

      Copy fakeinputlib binary from APK to local directory.
      Throws:
        `java.io.IOException`

    - #### spawn_adb

          public void spawn_adb()

      Start ADBService, which will call fakeinputlib on commandline. This is necessary in order to keep fakeinputlib alive even when the application itself is closed.
      Throws:
        `java.lang.Exception`