bk138 / droidVNC-NG

VNC server app for Android that does not require root privileges.
GNU General Public License v2.0
1.33k stars 191 forks source link

Explore use of API 33 methods to overcome Android limitiation where for some text fields only single character can be entered #208

Open freebrowser1 opened 4 months ago

freebrowser1 commented 4 months ago

Update to 2.40 results in restricted setting and even the ADB setting does not help. After setting : adb shell settings put secure enabled_accessibility_services net.christianbeier.droidvnc_ng/.InputService:$(adb shell settings get secure enabled_accessibility_services) it still says 'Restricted setting'. Even setting 'Allow restricted settings' in 'settings => apps => three dots top right => allow` does not help.

freebrowser1 commented 4 months ago

After uninstalling the app and reinstalling it from f-droid it did work, no 'restricted' settings. Presumable Android does not like downloading from Github. But still when typing in a text area the letters don't proceed, i.e. each letter is typed over the other.

bk138 commented 4 months ago

@freebrowser1 that is a known issue with some text entry fields, I saw this mostly on older devices with search fields. Most other text inputs did/do work though. Can you provide more details for a repro case?

freebrowser1 commented 4 months ago

@bk138 : Yes, I filled in on a website in Iceraven browser (Firefox clone) on this page: https://github.com/bk138/droidVNC-NG/issues/208, which is exactly this ticket and it went wrong, so I used my laptop replying to this ticket. But when I type in the URL bar of the browser over the same VNC, it did work. VNC client: RealVNC. I hope that this is enough information.

Another (unrelated / off-ticket) issue: when using this VNC it is not encrypted (which is standard in VNC). May be an option is making the server localhost only and that a user should connect with an SSH tunnel and use VNC over SSH.

bk138 commented 4 months ago

Confused. So it works now?

freebrowser1 commented 4 months ago

Yes it works, except for some text areas.

bk138 commented 4 months ago

Known issue, follow up to #4, can maybe be overcome by using https://developer.android.com/reference/android/accessibilityservice/AccessibilityService#getInputMethod(), https://developer.android.com/reference/android/accessibilityservice/InputMethod#getCurrentInputConnection() and https://developer.android.com/reference/android/accessibilityservice/InputMethod.AccessibilityInputConnection#sendKeyEvent(android.view.KeyEvent)