Skip to content

rock3r/CameraSync

Repository files navigation

CameraSync

A simple Android application that synchronizes GPS data and date/time from your Android phone to your camera via Bluetooth Low Energy (BLE).

The app supports a multi-vendor architecture, allowing it to work with cameras from various manufacturers (Ricoh, Sony, etc.).

The app allows you to select your camera from nearby BLE devices on the first start. Once paired, it automatically reconnects and maintains synchronization in the background whenever the camera's Bluetooth is active.

Features

  • Multi-Vendor Support: Built with an extensible architecture to support various camera brands (Ricoh currently supported).
  • Automatic Synchronization: Real-time GPS location and date/time sync.
  • Auto-reconnection: Automatically reconnects to paired cameras when they are within range.
  • Background Operation: Continues to sync even when the app is backgrounded (using a foreground service).
  • Material 3 UI: Modern and clean interface built with Jetpack Compose.

Supported cameras

  • Sony Alpha cameras (tested with Alpha 7 Mk 4, but all other modern Alpha cameras with BLE support should work)
  • Ricoh GR III/IIIx (tested with GR IIIx, but other Ricoh models could also work)

Let me know if you manage to use the app with other camera models so I can add them to the list.

Requirements

Hardware

  • An Android device running Android 13 (API level 33) or higher.
  • A supported BLE-enabled camera (e.g., Ricoh GR III, GR IIIx).

Permissions

The app requires the following permissions to function correctly:

  • Bluetooth: For discovering and communicating with the camera.
  • Location (Fine/Precise): Required by Android for BLE scanning and for providing GPS data to the camera.
  • Notifications: For the foreground service that maintains the connection in the background.
  • Background Location: To continue providing GPS data when the app is in the background (optional but recommended for full functionality).

Important

The app MUST be in the foreground during the initial connection to the camera. After the connection is established, it can safely run in the background. You may need to exclude the app from battery optimizations to ensure stable background operation.

Architecture & Multi-Vendor Support

The project has been refactored to support cameras from multiple manufacturers. It uses a strategy pattern where each vendor provides its own GATT specification and protocol implementation.

For more details on how to add support for new vendors, see MULTI_VENDOR_SUPPORT.md.

Setup & Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/CameraSync.git
    cd CameraSync
  2. Open in Android Studio: Open the project in Android Studio (Ladybug or newer recommended).

  3. Build the project:

    ./gradlew build

Running the App

To install and run the debug version of the app on your connected device:

./gradlew installDebug

Development & Scripts

This project uses Gradle with Kotlin DSL.

Key Gradle Tasks

  • ./gradlew assembleDebug: Build the debug APK.
  • ./gradlew bundleRelease: Build the release App Bundle.
  • ./gradlew test: Run unit tests.
  • ./gradlew connectedAndroidTest: Run instrumented tests on a device.
  • ./gradlew ktfmtFormat: Format the code using ktfmt (if configured).

Environment Variables

No specific environment variables are required for a standard build. Ensure JAVA_HOME is set to a compatible JDK (JDK 11+).

Project Structure

  • app/src/main/kotlin: Main source code.
    • .../vendors: Vendor-specific implementations (GATT specs, protocols).
    • .../data: Repositories and data sources (Location, Camera, Protobuf).
    • .../devicesync: Foreground service and synchronization logic.
    • .../domain: Business logic, models, and repository interfaces.
    • .../scanning: Camera discovery and pairing UI.
    • .../ui: Theme and shared UI components.
  • app/src/main/proto: Protocol Buffer definitions for data storage.
  • app/src/test: Unit tests.

Technical Stack

Testing

Run unit tests:

./gradlew test

Note

Primary test configuration used during development: Pixel 9 + Android 15 + Ricoh GR IIIx.

License

Copyright 2026 Sebastiano Poggi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors 2

  •  
  •  

Languages