Skip to content

Add background volume-key recording, camera selection, and media management - #165

Open
fukang0611 wants to merge 2 commits into
Myzel394:masterfrom
fukang0611:feat/recording-controls-camera-selection
Open

fukang0611 wants to merge 2 commits into
Myzel394:masterfrom
fukang0611:feat/recording-controls-camera-selection

Conversation

@fukang0611

Copy link
Copy Markdown

Problem and behavior

Alibi currently has no background hardware-key recording controls or library for managing recorded fragments and exports. Camera selection also assumes numeric IDs describe lens facing, which breaks on devices with additional rear cameras.

This adds:

  • An opt-in accessibility service: hold Volume Up for front-camera video, or Volume Down for the configured rear camera; hold the same key again to stop. Short presses retain volume control. The service filters keys without reading screen contents and starts recording without opening an activity.
  • Start/stop/failure haptics, an optional floating red recording dot, and a recording notification with a stop action. Overlay and accessibility permissions have explicit settings controls. Pending start requests expire rather than executing later.
  • A recording library with audio/video and fragment/export filters, playback, sharing, refresh, and confirmed deletion across internal, app-media, and retained custom-folder access. Active recordings/merges are protected; previous fragments are archived without deleting exports.
  • Rear-camera settings using actual Camera2 facing metadata and opaque logical/physical camera IDs, with CameraX filtering and physical-lens routing where supported. Front shortcuts ignore the rear-camera preference.

The build is also updated to Gradle 8.13 / AGP 8.13.2 / Kotlin 2.3.21 / SDK 36, Java 17 bytecode, a version catalog, current compatible Compose/CameraX dependencies, and a maintained FFmpegKit community artifact. Minimum SDK remains 24. The app version is bumped to 0.6.1, and PR CI now runs JVM tests as well as the debug build.

Validation

  • Debug build, 20 JVM tests, and Release R8 minification passed.
  • 9 Android instrumentation tests passed on an Android 15 arm64 emulator through adb am instrument: settings migration, archive protection, native audio/video merging, startup binding readiness, camera catalog identity, and opening/stopping actual front and rear cameras.
  • APK 16 KB ZIP alignment and v2 signature verification passed.
  • Xiaomi 14 Ultra / Android 16: background Volume Down start/stop without an activity flash, vibration, and red indicator were verified interactively. The device owner has additionally confirmed that front-camera and multiple-rear-camera acceptance testing passed.

Vendor background restrictions, exposed physical lenses, supported recording resolutions, and lock-screen behavior vary by device. Acceptance on the Xiaomi does not establish coverage for other devices.

The branch excludes fork attribution changes and local Graphify/APK/log artifacts. No production signing keys are included.

Add background volume-key video shortcuts with haptics and recording indicators, plus playback, sharing, deletion, and archive protection for media files. Support front-camera recording via Volume Up and configurable rear logical or physical lenses via Volume Down.

Upgrade Android build dependencies for SDK 36 and version 0.6.1. Add 20 JVM tests and 9 emulator integration tests; retain pending physical-device validation for the new front and multicamera paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant