Skip to content
Ishaanj2007Public

About

A minimal, deterministic timed clipboard queue for Android

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

ClipQ Logo

ClipQ

A minimal, deterministic timed clipboard queue for Android.

Platform Kotlin Design Version


Overview

ClipQ automates copying a list of usernames or text entries to the Android system clipboard at a precise, user-configured interval so you can paste entries sequentially in another app without switching back and forth.

Delayed-First-Copy Behavior

ClipQ is built around a strict delayed-first-copy guarantee: pressing Start begins the countdown immediately without overwriting your clipboard on tap, giving you time to switch to your target app.

Queue:    Ishaan@123, AnotherUser, Username123, Example_User
Interval: 3.0s

00:00.0  Start pressed  -> Countdown starts (clipboard untouched)
00:03.0  Interval 1     -> Copies "Ishaan@123"
00:06.0  Interval 2     -> Copies "AnotherUser"
00:09.0  Interval 3     -> Copies "Username123"
00:12.0  Interval 4     -> Copies "Example_User" -> Queue completes & stops

Features

Monotonic Timing & Playback

  • Seconds & Milliseconds Precision: Configure seconds (0–3600) and milliseconds (0–999), or choose quick presets (1s, 3s, 5s, 10s).
  • Drift-Free Scheduling: Anchored to SystemClock.elapsedRealtime() with single-job exclusivity so duplicate timers cannot run concurrently.
  • Exact Pause & Resume: Pausing freezes the countdown and preserves exact remaining milliseconds; resuming continues from that remainder without restarting the interval or duplicating entries.
  • Skip Next & Stop: Skip copies the next entry immediately as an explicit user action and schedules a fresh interval for the entry after it.

Username Queue Editor & Cleanup Filters

  • Multiline Editor: Live processed entry count and character count, Format as lines, Paste, zero-permission Import TXT (Android Storage Access Framework), Select all, and Clear.
  • 7 Independently Configurable Filters:
    1. Split entries on the same line — toggleable separators (Spaces, Tabs, Commas, Semicolons, Pipes) while preserving $, #, _, and . inside entries.
    2. Remove list numbering — strips prefixes such as 1., 02), (3), -, and • without altering numbers inside usernames.
    3. Remove leading @ — converts @username to username.
    4. Remove duplicate entries — case-insensitive deduplication preserving original order and first occurrence spelling.
    5. Remove blank entries — removes empty and whitespace-only entries.
    6. Clean Instagram profile URLs — extracts the handle from instagram.com/<username>/ links while leaving regular usernames untouched.
    7. Trim surrounding whitespace — cleans leading and trailing spaces per entry.
  • Live Queue Preview: Inspect numbered processed output before starting, without mutating your raw input unless you tap Format as lines.
  • Local Persistence: Draft lists, filter configurations, timer intervals, and appearance preferences persist across app restarts via Jetpack DataStore.

Notification Controls & Optional Floating Overlay

  • Persistent Foreground Service (specialUse): Silent ongoing progress notification (Copying username X of Y) with direct Pause / Resume, Skip next, and Stop actions that work without opening the app, plus a completion alert when all entries finish.
  • Lock-Screen Safe: Notifications never display actual username strings.
  • Optional Floating Play/Pause Control: Off by default. When enabled and granted overlay permission, displays a compact, draggable circular play/pause button over other apps with a one-tap hide control.

Appearance & Theming

  • System, Light & Dark Modes: Built with a cohesive Forest Sage Green and warm stone palette, plus optional Material You Dynamic Colour on Android 12+.
  • Edge-to-Edge & Focus-Stable Editor: Theme-synchronized system bars, proper IME inset handling, disabled Force Dark, and locked OutlinedTextField container surfaces so text fields retain their theme across focus changes.

Architecture

ClipQ follows clean MVVM separation with pure, testable domain logic decoupled from Android services and UI state:

┌─────────────────────────────────────────────────────────────────────────┐
│                       Jetpack Compose UI (Material 3)                   │
│             MainActivity  ->  ClipQScreen  ->  Modular Sections         │
└───────────────────────────────────┬─────────────────────────────────────┘
                                    │ StateFlow / User Actions
                                    ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                             ClipQViewModel                              │
└──────────────┬───────────────────────────────────────┬──────────────────┘
               │                                       │
               ▼                                       ▼
┌──────────────────────────────┐     ┌────────────────────────────────────┐
│     Domain Layer (Pure)      │     │     Data & Persistence Layer       │
│  • QueueParser & Filters     │     │  • ClipQPreferencesRepository      │
│  • QueueTimerEngine          │     │    (Jetpack DataStore Preferences) │
│  • MonotonicClock            │     │  • QueueStateHolder (StateFlow)    │
└──────────────┬───────────────┘     └────────────────────────────────────┘
               │ Hosted by
               ▼
┌─────────────────────────────────────────────────────────────────────────┐
│               ClipboardQueueService (Foreground: specialUse)            │
│   AndroidClipboardWriter  |  NotificationController  |  OverlayCtrl     │
└─────────────────────────────────────────────────────────────────────────┘

Project Metadata

Property Value
Application ID / Namespace com.ishaan.clipq
Version 1.3.0 (versionCode = 13)
Min SDK Android 8.0 (API 26)
Target / Compile SDK API 36
Language & UI Kotlin, Jetpack Compose, Material 3

Building & Testing

Requirements

  • Android Studio (Ladybug or newer) or Gradle 9+
  • JDK 17+
  • Android SDK Platform 36

Commands

# Run all unit and Robolectric UI/notification tests
./gradlew testDebugUnitTest

# Build the debug APK
./gradlew assembleDebug

The generated debug APK is written to:

app/build/outputs/apk/debug/app-debug.apk

Test Coverage

  • QueueParserTest — verifies all 7 cleanup filters, separator combinations, special character preservation ($, #, _, .), list numbering, Instagram URL cleaning, and case-insensitive deduplication.
  • QueueTimerEngineTest — verifies delayed-first-copy, millisecond accuracy, pause/resume remainder preservation, skip next, stop, automatic completion, single-job exclusivity, and transparent write-failure handling.
  • ClipQScreenRobolectricTest — verifies Light, Dark, System, and Dynamic themes, focus-stable editor container colors, playback control state visibility, and landscape layouts.
  • NotificationControllerRobolectricTest — verifies notification channels, lock-screen username omission, Pause/Resume/Skip/Stop actions, and completion alerts.

Permissions & Privacy

Permission Purpose
FOREGROUND_SERVICE / FOREGROUND_SERVICE_SPECIAL_USE Keeps the user-initiated timed queue running reliably with visible status controls.
POST_NOTIFICATIONS Displays silent queue progress controls and completion alerts on Android 13+.
SYSTEM_ALERT_WINDOW Optional, requested only if you enable the floating play/pause control.
  • Zero storage permissions: .txt file import uses Android's Storage Access Framework (OpenDocument).
  • Zero background clipboard reading: ClipQ writes via ClipboardManager.setPrimaryClip(...) and only reads the clipboard when you explicitly tap Paste.
  • No sensitive logging: Usernames and clipboard contents are never written to logs or notifications.
  • No Accessibility Services: ClipQ never requests or uses accessibility APIs.

Android Platform Limitations

Starting with Android 10 (API 29) and reinforced on Android 13+ and custom OEM ROMs (such as MIUI/HyperOS, ColorOS, and OneUI), Android can restrict background clipboard writes when an app does not hold window focus. ClipQ runs as a user-visible foreground service and checks clipboard write calls honestly—if the OS or device ROM blocks a write while another app is active, ClipQ reports the failure transparently in the UI and notification instead of falsely displaying success.

About

A minimal, deterministic timed clipboard queue for Android

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages