mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 01:51:47 +00:00
## 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](https://developer.android.com/reference/android/accessibilityservice/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 
11 lines
437 B
XML
11 lines
437 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:orientation="vertical" android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content">
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/mouse_cursor"
|
|
android:src="@drawable/mouse_pointer" />
|
|
</RelativeLayout> |