Add remote shooting and camera control functionality#10
Open
Add remote shooting and camera control functionality#10
Conversation
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingViewModel.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/domain/model/RemoteControlModels.kt
Outdated
Show resolved
Hide resolved
bbbe5bd to
ea073ba
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/domain/model/RemoteControlModels.kt
Outdated
Show resolved
Hide resolved
ea073ba to
67c6c20
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohGattSpec.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/data/repository/KableCameraRepository.kt
Show resolved
Hide resolved
67c6c20 to
7a7a44f
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingViewModel.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Show resolved
Hide resolved
7a7a44f to
37f017b
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohProtocol.kt
Show resolved
Hide resolved
37f017b to
a5d60d2
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingScreen.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohProtocol.kt
Show resolved
Hide resolved
a5d60d2 to
082960d
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingViewModel.kt
Outdated
Show resolved
Hide resolved
082960d to
fa52369
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
fa52369 to
5344bac
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/devices/DeviceCard.kt
Outdated
Show resolved
Hide resolved
5344bac to
1d6802f
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/domain/vendor/CameraVendor.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Show resolved
Hide resolved
1d6802f to
7e37056
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohProtocol.kt
Outdated
Show resolved
Hide resolved
7e37056 to
146fa4d
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Show resolved
Hide resolved
146fa4d to
cd90310
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/devicesync/MultiDeviceSyncCoordinator.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingViewModel.kt
Show resolved
Hide resolved
cd90310 to
a34d6b4
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingViewModel.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/devicesync/DeviceConnectionManager.kt
Outdated
Show resolved
Hide resolved
a34d6b4 to
410df17
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
410df17 to
352d7ca
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyCameraVendor.kt
Show resolved
Hide resolved
352d7ca to
39d2354
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Outdated
Show resolved
Hide resolved
39d2354 to
27fedc9
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohProtocol.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/ui/remote/RemoteShootingViewModel.kt
Show resolved
Hide resolved
d09a96f to
adc526f
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohProtocol.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Show resolved
Hide resolved
adc526f to
ccd3989
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohRemoteControlDelegate.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyRemoteControlDelegate.kt
Show resolved
Hide resolved
ccd3989 to
277240d
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/sony/SonyProtocol.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohCameraVendor.kt
Show resolved
Hide resolved
277240d to
986797d
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/devicesync/MultiDeviceSyncService.kt
Show resolved
Hide resolved
app/src/main/kotlin/dev/sebastiano/camerasync/vendors/ricoh/RicohCameraVendor.kt
Outdated
Show resolved
Hide resolved
986797d to
012c6aa
Compare
app/src/main/kotlin/dev/sebastiano/camerasync/devicesync/DeviceConnectionManager.kt
Show resolved
Hide resolved
012c6aa to
8996172
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
app/src/main/kotlin/dev/sebastiano/camerasync/devicesync/MultiDeviceSyncCoordinator.kt
Show resolved
Hide resolved
- Add a Remote Control navigation route and RemoteShootingScreen to enable manual camera control and live status monitoring. - Implement RemoteShootingViewModel to coordinate UI state, connection lifecycle, and delegate interactions. - Introduce RemoteControlDelegate/RemoteControlCapabilities contracts to support vendor-specific remote control logic with BLE now and Wi‑Fi tiering later. - Implement SonyRemoteControlDelegate and RicohRemoteControlDelegate with protocol-specific decoding of shooting status, battery, storage, and mode data. - Extend SonyProtocol and RicohProtocol with new encoders/decoders for remote control notifications and command payloads (e.g., FF02, CC09, CC10, CC0F, etc.). - Update CameraVendor/CameraConnection to expose remote control support and delegate access. - Add Remote Control entrypoint on DeviceCard, gated to connected devices. - Add vector assets for camera modes, drive modes, focus/shutter status, and battery indicators. - Add/migrate Compose UI tests to JVM unit tests for remote shooting UI components and DeviceCard behavior. - Add comprehensive unit tests for protocol parsing, delegate behavior, and coordinator interactions. - Add a detekt custom rule forbidding fully qualified app references and add tests for that rule. - Document in AGENTS.md that ./gradlew check is mandatory at the end of every task.
8996172 to
ae9e414
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces remote shooting and camera control across the app, including
a new Remote Control UI flow, view model orchestration, and vendor‑specific
protocol/delegate implementations for Sony and Ricoh. It also adds a custom
detekt rule to prevent fully‑qualified app references, with tests, and updates
AGENTS.md to make
./gradlew checka mandatory end‑of‑task step.Key Changes
Remote Control UI/Navigation
RemoteShootingScreento allow usersto trigger the shutter and monitor camera status.
connected devices.
ViewModel + State Orchestration
RemoteShootingViewModelto manage:Vendor Abstractions
RemoteControlDelegateandRemoteControlCapabilitiesinterfaces toencapsulate vendor‑specific control and telemetry.
support consistently across vendors.
Vendor Implementations
SonyRemoteControlDelegateandRicohRemoteControlDelegate.including FF02/CC09/CC10/CC0F where applicable.
future Wi‑Fi tier support.
UI/UX Enhancements
DeviceCardshown only when a deviceis connected and supports remote control.
Tests
Android instrumentation.
Detekt Rule (No FQNs)
dev.sebastiano.camerasync.*references (encourages imports).Documentation
AGENTS.mdto make./gradlew checka mandatory end‑of‑task step.Testing
./gradlew checkNotes
khronicle-core’slint.jarlacking a registrymanifest; we are intentionally leaving this as‑is pending upstream fix.
Note
Medium Risk
Touches BLE scanning/protocol code and foreground-service sync lifecycle (including per-device refresh and connection teardown), which can impact connectivity stability and battery usage; changes are sizable but largely additive behind capability checks.
Overview
Adds an end-to-end Remote Shooting flow: a new
NavRoute.RemoteControl,RemoteShootingScreen, andRemoteShootingViewModel, plus a connected-only “Remote shooting” action on device cards that navigates into per-device control/telemetry.Extends the vendor/connection layer to support remote control via new
RemoteControlCapabilities/RemoteControlDelegateAPIs, adds delegate creation/caching onCameraConnection, and updates sync logic to use newSyncCapabilities(replacingCameraCapabilities) and a cachedsupportsLocationSync()hot-path check.Implements vendor-specific remote control over BLE for Ricoh and Sony (new GATT/protocol decoding, trigger-capture sequences, battery/storage/mode status observation), improves BLE scanning by adding manufacturer-data filters (notably Ricoh), and hardens connection lifecycle management (singleton
DeviceConnectionManager, connection flow, stale-job-safe teardown, and a new single-device refresh intent/action inMultiDeviceSyncService).Build/test plumbing is updated to run Robolectric/Compose UI tests in unit tests (
isIncludeAndroidResources, manifest property wiring, release unit test disabled), adds remote-control-related test dependencies, and updatesAGENTS.mdto require./gradlew check.Written by Cursor Bugbot for commit ae9e414. This will update automatically on new commits. Configure here.