mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
971fcbd34c26b2c7187c16192525a4fa0e4b3b90
Play auto-refunds (and revokes) purchases not acknowledged within 3 days. The in-process ack machinery covers every case where the process lives long enough; what it cannot cover is a process death around the Play sheet (aggressive OEM task killers) followed by the user not reopening the app before the deadline. Add a gplay-only WorkManager safety net: - PurchaseAckWorker: self-completing sweep via a new bounded BillingManager.ensureAllAcknowledged() that refreshes and acknowledges in the same coroutine (the reactive ack collector is async, so a worker cannot prove its acks happened through it). Retries with exponential backoff until the purchase's refund deadline, then gives up visibly. - PurchaseAckScheduler: two unique work identities. A launch watch (REPLACE, armed and awaited before launchBillingFlow with a 30min delay so it cannot complete while the user is still in the sheet) and a discovered-purchase rescue (KEEP, 1min delay, armed directly from an ack pass that finds unacknowledged purchases, pre-attempt). Separate identities so a new purchase flow can never displace a pending rescue. Both triggers are fail-open: a broken WorkManager never blocks a purchase or an ack. WorkManager resolves via Provider at first arm so eager Application-time construction of the billing stack cannot trigger WorkManager's on-demand initialization prematurely. - Nothing cancels the work from the foreground path: an ack pass can see zero unacked purchases while the sheet is still open, so the worker completes itself after its own reconciliation instead. The ack pass now runs under a mutex (the worker sweep and the reactive collector would otherwise race the token bookkeeping) and reports per-outcome counts for the sweep result mapping. This is a port of d4rken-org/sdmaid-se#2685; the ported sources are byte-identical to the donor apart from the package rename. CAPod had no explicit WorkManager wiring at all (work-runtime only arrived transitively through Glance), so this also adds it: - addWorkerManager() pinning androidx.work 2.7.1, the version already resolved via Glance, plus androidx.hilt:hilt-work and its KSP compiler. work-runtime-ktx is required at 2.7.1: CoroutineWorker, Operation.await, OneTimeWorkRequestBuilder and workDataOf all still live in the ktx artifact at that version. androidx.hilt moves 1.0.0 -> 1.2.0 (by conflict resolution) because 1.0.0's hilt-compiler ships no KSP SymbolProcessorProvider, so @HiltWorker would generate nothing. - WorkManagerModule providing the singleton WorkManager. - App implements Configuration.Provider with the injected HiltWorkerFactory. WorkManager 2.7.1 still declares that interface as getWorkManagerConfiguration(), not the later property form. - The manifest removes androidx.work's startup initializer so the on-demand configuration is the one that takes effect. FOSS stays untouched behaviour-wise: all new billing types live in src/gplay, workers need no manifest entry, and the worker factory resolves the worker only in gplay variants.
Companion App for AirPods (CAPod)
A companion app that adds support for AirPod specific features to Android:
- Battery level for pods & cases.
- Charging status for pods & case.
- Additional infos about connection, microphone & case.
- Can receive and show all nearby devices.
- Ear detection with automatic play/pause.
- Automatically connect phone & AirPods.
- Show popup when case is opened.
- Widgets
CAPod is ad-free. Some additional features require an in-app purchase.
Currently supported models:
- AirPods 1. Generation
- AirPods 2. Generation
- AirPods 3. Generation
- AirPods 4. Generation
- AirPods 4. Generation with ANC
- AirPods Pro 1. Generation
- AirPods Pro 2. Generation
- AirPods Pro 2. Generation (USB-C)
- AirPods Pro 3. Generation
- AirPods Max
- AirPods Max (USB-C)
- AirPods Max 2. Generation
- Power Beats Pro
- Power Beats Pro 2
- Power Beats 3
- Power Beats 4
- Beats Solo 3
- Beats Solo Pro
- Beats Solo 4
- Beats Solo Buds
- Beats Studio 3
- Beats Studio Buds
- Beats Studio Buds+
- Beats Studio Pro
- Beats X
- Beats Flex
- Beats Fit Pro
- Fake AirPods 1. Generation 🎭
- Fake AirPods 2. Generation 🎭
- Fake AirPods 3. Generation 🎭
- Fake AirPods Pro1 🎭
- Fake AirPods Pro2 🎭
Download
| Source | Status |
|---|---|
| Google Play | |
| Google Play Beta | |
| Github (Release) | |
| Github (Pre-Release) | |
| F-Droid | |
| F-Droid (IzzyOnDroid) |
Support the project
- Buy the CAPod Pro In-App purchase on Google Play
- Sponsor development on GitHub
- Help translate CAPod on Crowdin
Get help
Screenshots
Thanks to
- The OpenPods project, specifically @adolfintel and @Electric1447
- Martin, Jeremy & Alpuche, Douglas & Bodeman, Kristina & Brown, Lamont & Fenske, Ellis & Foppe, Lucas & Mayberry, Travis & Rye, Erik & Sipes, Brandon & Teplov, Sam. (2019). Handoff All Your Privacy – A Review of Apple’s Bluetooth Low Energy Continuity Protocol. Proceedings on Privacy Enhancing Technologies. 2019. 34-53. 10.2478/popets-2019-0057.
- Celosia, Guillaume. (2020). Privacy Challenges in Wireless Communications of the Internet of Things.
- The MagicPods project. If you are looking for "CAPod for Windows", check it out.
- @kavishdevar and his LibrePods project for sharing a lot of cool stuff.
- Crowdin for supporting open-source projects.
License
CAPod's code is available under a GPL v3 license, this excludes:
- CAPod icons, logos, mascots and marketing materials/assets.
- CAPod animations and videos.
- CAPod documentation.
- Google Play screenshots.
- Google Play texts & descriptions.
- Translations.
Description
Mirror of capod from GitHub (https://github.com/d4rken-org/capod)
Readme
GPL-3.0
139 MiB
Languages
Kotlin
99.1%
Shell
0.8%






