Configuration & Preferences

AVNC settings are managed via AndroidX Preference fragments in PrefsActivity.kt and mapped to data objects in AppPreferences.kt.

Preferences are divided into five main categories:

1. Interface

Controls the look and feel of the application.

  • Theme: Select between Light, Dark, or System default.
  • Sort Server List: Alphabetically sort the saved servers on the Home screen instead of sorting by usage frequency.
  • Advanced Editor: Bypass the minimal profile creation dialog and go straight to the advanced editor.

2. Viewer

Settings related to the active VNC session (VncActivity).

  • Orientation: Force Portrait, Landscape, or Auto-rotate.
  • Keep Screen On: Prevents the device from sleeping while a VNC session is active.
  • Picture-in-Picture: Allows AVNC to shrink to a floating window when navigating away from the app.
  • Zoom: Defines Min/Max zoom limits and toggles whether zoom states are saved independently for Portrait vs. Landscape orientations.

3. Input

Defines how user input maps to VNC actions.

  • Gesture Style: Switch between Touchscreen (absolute) and Touchpad (relative) pointer modes.
  • Custom Gestures: Map specific actions (Left Click, Right Click, Middle Click, Pan, Scroll, Drag) to physical gestures (Single Tap, Two-finger Tap, Double Tap, Long Press, Swipes).
  • Mouse Passthrough: Choose whether physically connected Bluetooth/OTG mice control the local Android UI or pass their raw events directly to the VNC server.
  • Virtual Keys: Define how many rows of virtual keys are shown and customize which exact X11 keys (F-keys, modifiers) are displayed.
  • Key Mappings: Map physical Android hardware keys (like Alt or Language Switch) to the Super/Windows key.

4. Servers

Settings governing connections and network discovery.

  • Clipboard Sync: Toggles bidirectional clipboard sharing.
  • Lock Saved Servers: Forces biometric/PIN authentication before AVNC will connect to any saved server profile.
  • Auto Reconnect: Attempt to re-establish the connection seamlessly if the network drops.
  • Zeroconf Discovery: Toggle automatic background mDNS polling.

5. Tools

  • Import/Export: Backup ServerProfile databases to JSON files. Features an option to securely include/exclude passwords and SSH keys.
  • Debugging: Access raw Logcat outputs, Touch Event visualizers, and Key Event inspectors to aid in reporting GitHub issues.