Skip to content

Implement basic mouse receiver

Summary

A basic mouse receiver implementation. You can now control your Android Device remotely which might be useful when it's connected to a bigger screen (via HDMI).

Unfortunately Android does not provide moving mouse by software (other than adb and without root). Therefore this implementation uses Android AccessibilityService to create an ImageView Overlay as mouse pointer and simulate touch gestures. This is quite hacky but I think the best way to do so.

Demo

Here is a small demo

Screen_Capture_select-area_20200803155517

TODO

Although the basic implementation is done there is some additional functionality that might be useful:

  • auto hide mouse pointer when inactive
  • add scroll functionality (using AccessibilityService Scroll views can be identified an scroll can be triggerd - therefore we need "Retrieve window content" permission) see below
  • right click, middle click and long click could be used for back, home and recent
  • double touch could trigger touch'n'hold (for gestures and drag'n'drop) see below
Edited by Sohny Bohny

Merge request reports