Slide Android is the phone/tablet side of Slide: an old Android app that turns a mobile device into a wireless or USB-connected pen tablet, touchpad, keyboard helper, and gesture controller for a desktop computer.
It was built around the idea that a phone screen, touch input, and Samsung S Pen support could act like a lightweight graphics tablet. The companion desktop app receives compact input messages from the Android app and converts them into real mouse, keyboard, scroll, zoom, copy/cut/paste, and right-click events on the computer.
- Uses the Android device as a relative mouse/touchpad for a computer.
- Supports S Pen/touch input, including pressure-related behavior where available.
- Sends tap, click-and-drag, long-hold/right-click, scroll, zoom, and keyboard events to the desktop app.
- Can connect over Wi-Fi/LAN or over USB with ADB port forwarding.
- Broadcasts itself on the local network so the desktop app can discover it automatically.
- Provides a full-screen drawing/control canvas with optional path drawing and auto-clear behavior.
Slide is split across three repositories/projects in this folder:
slide-android: this Android app. It captures touch, S Pen, gestures, and keyboard input.slide-desktop: the Scala/Java desktop receiver. It discovers the device, connects to it, and usesjava.awt.Robotto perform input on the computer.SlideLauncher: a small Windows launcher/updater for the desktop JAR.
The Android app is the server for the live input stream. The desktop app discovers the phone, connects to it, then reads serialized short[] command packets.
-
The Android app starts a UDP broadcast thread when Wi-Fi is available.
-
Every couple of seconds it broadcasts:
phone_ip,manufacturer,modelto UDP port
5000on the local broadcast address. -
The desktop app listens for those broadcasts and shows the discovered device.
-
When the user connects from the desktop app, it opens a TCP connection to the phone on port
8074. -
The Android app sends Java-serialized
short[]messages over anObjectOutputStream.
- The Android app detects a USB connection and checks whether Android USB debugging is enabled.
- The desktop app uses ADB to forward a local desktop port to the Android app's USB server port.
- The desktop app connects to
localhostand reads the same command stream over TCP. - USB mode uses port
8072on the Android side.
Most commands are small short[] arrays. The first value is a command id, usually based on 10000, and following values contain command parameters.
Examples:
10003: movement mode / moving10004: tap10005: mouse down10006: mouse up10007: long hold / right click10009: keyboard key code10011: relative positioning configuration10012-10017: zoom and scroll directions10018-10020: cut, copy, paste10002: close connection
The desktop app maps these ids to actions in its DeviceMessageType enum and executes them with java.awt.Robot.
-
app/src/main/java/com/j03/mobileinput/SettingsActivity.java- Main launcher/settings activity.
- Starts Wi-Fi broadcasting and USB detection.
- Switches between Wi-Fi and USB connection modes.
-
app/src/main/java/com/j03/mobileinput/Canvas/CanvasActivity.java- Full-screen control surface.
- Sends keyboard, cut/copy/paste, close, and canvas-related commands.
-
app/src/main/java/com/j03/mobileinput/Canvas/CanvasView.java- Drawing/control view used by the canvas activity.
-
app/src/main/java/Gesture/Controller.java- Core gesture interpreter for touch, hover, S Pen, multitouch, scrolling, zooming, right-click, and pressure-click behavior.
-
app/src/main/java/Gesture/Binding/Actions/- Defines command packets for triggers, toggles, and range/continuous controls.
-
app/src/main/java/Connection/Network/- Wi-Fi discovery and TCP server logic.
-
app/src/main/java/Connection/USB/- USB TCP server used together with ADB forwarding from the desktop app.
-
app/src/main/res/xml/preferences.xml- User-facing settings for sensitivity, positioning, action bar, draw path, pressure-clicking, right-click, zoom, and scrolling.
This is an old Android project and uses the Android Gradle plugin from the Android 5.x era:
- Android Gradle plugin:
com.android.tools.build:gradle:1.2.3 - Compile SDK:
22 - Build tools:
22.0.1 - Min SDK:
17 - Target SDK:
22 - Bundled dependencies include Samsung S Pen libraries in
app/libs/
A historical build would have been run with:
./gradlew assembleDebugOn a modern machine, expect to need an older JDK/Gradle/Android SDK setup or to migrate the project before it builds cleanly.
- Build/install the Android app on the device.
- Start the companion
slide-desktopapplication on the computer. - Choose a connection mode:
- Wi-Fi: put both devices on the same LAN and allow the desktop app through the firewall.
- USB: enable Developer Options and USB debugging on Android, then connect the phone by USB.
- Tap the discovered device in the desktop app to connect.
- The Android app opens the canvas. Use the screen/S Pen as the desktop pointer.
- This is archival/old code and targets Android SDK 22-era APIs.
- Absolute positioning exists in the protocol and settings, but the UI currently exposes relative positioning only.
- The protocol uses Java object serialization, so the Android and desktop implementations are tightly coupled.
- The app is optimized for the devices and Samsung S Pen SDKs available at the time.
- Network discovery depends on UDP broadcast, which can be blocked by some routers, VPNs, and firewalls.
See LICENSE.