diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2ec0a9..c62b1a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: dotnet-version: '10.0.x' - name: Test - run: dotnet test tests/PodPilot.Core.Tests -c Release + run: dotnet test tests/Earlo.Core.Tests -c Release - uses: actions/download-artifact@v4 with: @@ -29,19 +29,19 @@ jobs: path: drivers merge-multiple: true - # The GitHub builds embed the driver so PodPilot can install it itself. + # The GitHub builds embed the driver so Earlo can install it itself. # A Microsoft-signed package in driver/signed/ wins over the CI test-signed build. - name: Embed driver package shell: pwsh run: | foreach ($arch in 'x64', 'arm64') { - $target = "src/PodPilot.App/DriverPackage/$arch" + $target = "src/Earlo.App/DriverPackage/$arch" New-Item -ItemType Directory -Force $target | Out-Null if (Test-Path "driver/signed/$arch/PodPilotAap.sys") { Copy-Item "driver/signed/$arch/*" $target Set-Content "$target/signing.txt" 'microsoft' } else { - Expand-Archive "drivers/PodPilotAap-driver-$arch.zip" "drivers/$arch" -Force + Expand-Archive "drivers/Earlo-driver-$arch.zip" "drivers/$arch" -Force Copy-Item "drivers/$arch/PodPilotAap.sys", "drivers/$arch/PodPilotAap.inf", "drivers/$arch/podpilotaap.cat", "drivers/$arch/PodPilotAap.cer" $target Set-Content "$target/signing.txt" 'test' } @@ -52,38 +52,63 @@ jobs: shell: pwsh run: | foreach ($rid in 'win-x64', 'win-arm64') { - # Standalone: runs anywhere, trimmed and compressed (see PodPilot.App.csproj). - dotnet publish src/PodPilot.App -c Release -r $rid --self-contained -p:PodPilotFlavor=standalone ` + # Standalone: runs anywhere, trimmed and compressed (see Earlo.App.csproj). + dotnet publish src/Earlo.App -c Release -r $rid --self-contained -p:EarloFlavor=standalone ` -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o "publish/$rid" - Compress-Archive -Path "publish/$rid/PodPilot.exe" -DestinationPath "PodPilot-$rid.zip" -Force + Compress-Archive -Path "publish/$rid/Earlo.exe" -DestinationPath "Earlo-$rid.zip" -Force # Small: needs the .NET 10 Desktop Runtime installed. - dotnet publish src/PodPilot.App -c Release -r $rid --self-contained false -p:PodPilotFlavor=small ` + dotnet publish src/Earlo.App -c Release -r $rid --self-contained false -p:EarloFlavor=small ` -p:PublishSingleFile=true -o "publish/$rid-small" - Compress-Archive -Path "publish/$rid-small/PodPilot.exe" -DestinationPath "PodPilot-$rid-small.zip" -Force + Compress-Archive -Path "publish/$rid-small/Earlo.exe" -DestinationPath "Earlo-$rid-small.zip" -Force + + # PodPilot 0.4 and older update themselves from PodPilot-[-small].zip with PodPilot.exe + # inside. Publish the same Earlo builds under those names so they move over to Earlo. + foreach ($suffix in '', '-small') { + $legacy = New-Item -ItemType Directory -Force "legacy/$rid$suffix" + Copy-Item "publish/$rid$suffix/Earlo.exe" (Join-Path $legacy 'PodPilot.exe') + Compress-Archive -Path (Join-Path $legacy 'PodPilot.exe') -DestinationPath "PodPilot-$rid$suffix.zip" -Force + } # Microsoft Store: no driver, no self-update. $arch = $rid -replace 'win-', '' - dotnet publish src/PodPilot.App -c Release -r $rid --self-contained -p:PodPilotFlavor=store ` + dotnet publish src/Earlo.App -c Release -r $rid --self-contained -p:EarloFlavor=store ` -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o "publish/store-$arch" } - Get-ChildItem PodPilot-*.zip | ForEach-Object { "{0}: {1:N1} MB" -f $_.Name, ($_.Length / 1MB) } + Get-ChildItem Earlo-*.zip, PodPilot-*.zip | ForEach-Object { "{0}: {1:N1} MB" -f $_.Name, ($_.Length / 1MB) } + + # The app renders its own popups, settings and notices for the README (docs/screenshots). + - name: Render screenshots + continue-on-error: true + timeout-minutes: 5 + shell: pwsh + run: | + Start-Process publish/win-x64/Earlo.exe -ArgumentList '--render-preview', "$PWD\screenshots" -Wait + Get-ChildItem screenshots | ForEach-Object { "{0} ({1:N0} KB)" -f $_.Name, ($_.Length / 1KB) } + + - uses: actions/upload-artifact@v4 + with: + name: screenshots + path: screenshots + if-no-files-found: ignore - name: Store package shell: pwsh run: | - $version = ([xml](Get-Content src/PodPilot.App/PodPilot.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ } | Select-Object -First 1 + $version = ([xml](Get-Content src/Earlo.App/Earlo.App.csproj)).Project.PropertyGroup.Version | Where-Object { $_ } | Select-Object -First 1 ./tools/make-msix.ps1 -Version $version - uses: actions/upload-artifact@v4 with: name: app - path: PodPilot-*.zip + path: | + Earlo-*.zip + PodPilot-*.zip - uses: actions/upload-artifact@v4 with: name: store - path: PodPilot-store.msixbundle + path: Earlo-store.msixbundle driver: runs-on: windows-2022 @@ -118,12 +143,12 @@ jobs: $files | Where-Object Extension -eq '.cer' | Select-Object -First 1 | Copy-Item -Destination $out Copy-Item driver/install-driver.ps1, driver/uninstall-driver.ps1, driver/README.md $out $arch = $platform.ToLower() - Compress-Archive -Path "$out/*" -DestinationPath "PodPilotAap-driver-$arch.zip" -Force + Compress-Archive -Path "$out/*" -DestinationPath "Earlo-driver-$arch.zip" -Force - uses: actions/upload-artifact@v4 with: name: driver-${{ matrix.platform }} - path: PodPilotAap-driver-*.zip + path: Earlo-driver-*.zip release: if: startsWith(github.ref, 'refs/tags/v') @@ -137,5 +162,6 @@ jobs: # Only the zips go on GitHub; the Store bundle is uploaded to Partner Center. - uses: softprops/action-gh-release@v2 with: + name: Earlo ${{ github.ref_name }} files: '*.zip' generate_release_notes: true diff --git a/.gitignore b/.gitignore index f93a08e..1784317 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,5 @@ preview/ .vs/ .vscode/ TestResults/ -podpilot-log.txt -src/PodPilot.App/DriverPackage/ +earlo-log.txt +src/Earlo.App/DriverPackage/ diff --git a/PodPilot.sln b/Earlo.sln similarity index 89% rename from PodPilot.sln rename to Earlo.sln index 8c20798..2da3327 100644 --- a/PodPilot.sln +++ b/Earlo.sln @@ -5,13 +5,13 @@ VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PodPilot.Core", "src\PodPilot.Core\PodPilot.Core.csproj", "{83733803-54AC-43F6-9BAD-23B4D4285C97}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Earlo.Core", "src\Earlo.Core\Earlo.Core.csproj", "{83733803-54AC-43F6-9BAD-23B4D4285C97}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PodPilot.Core.Tests", "tests\PodPilot.Core.Tests\PodPilot.Core.Tests.csproj", "{48D51D4F-6215-4172-BC5C-D7B9BBBEFE49}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Earlo.Core.Tests", "tests\Earlo.Core.Tests\Earlo.Core.Tests.csproj", "{48D51D4F-6215-4172-BC5C-D7B9BBBEFE49}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PodPilot.App", "src\PodPilot.App\PodPilot.App.csproj", "{721FEE62-A88C-4E92-A6AE-40E02AD479B3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Earlo.App", "src\Earlo.App\Earlo.App.csproj", "{721FEE62-A88C-4E92-A6AE-40E02AD479B3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/LICENSE b/LICENSE index 7a92a4f..ffe15c1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 PodPilot contributors +Copyright (c) 2026 Earlo contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PRIVACY.md b/PRIVACY.md index 4579d10..a1624fe 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -1,19 +1,19 @@ -# PodPilot privacy policy +# Earlo privacy policy Last updated: 21 October 2026 -PodPilot does not collect, store or share personal data. There is no account, no analytics and no telemetry. +Earlo does not collect, store or share personal data. There is no account, no analytics and no telemetry. -## What PodPilot reads on your PC +## What Earlo reads on your PC - **Bluetooth LE broadcasts** from nearby AirPods and Beats (model, battery levels, in-ear and case status). These are processed in memory and never leave your PC. - **Paired Bluetooth devices**, to show your headphones' name and whether they are connected. - **Media playback state**, to pause and resume playback when you take an earbud out. -## What PodPilot stores +## What Earlo stores -Only on your PC, in `%APPDATA%\PodPilot`: +Only on your PC, in `%APPDATA%\Earlo`: - `settings.json`: your settings. - `case-battery.json`: the last known battery level of the charging case. @@ -28,4 +28,4 @@ Only on your PC, in `%APPDATA%\PodPilot`: ## Contact -Questions? Open an issue at https://github.com/kylianxdev/PodPilot/issues. +Questions? Open an issue at https://github.com/kylianxdev/Earlo/issues. diff --git a/README.md b/README.md index c530b55..4d7e3c8 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,40 @@

- PodPilot icon + Earlo icon

-

PodPilot

+

Earlo

Your AirPods, Beats and Galaxy Buds, finally at home on Windows.
- The iPhone battery popup, live battery levels, automatic ear detection and one-click connect.
+ The iPhone battery popup for Windows 10 and 11: live battery levels, automatic ear detection, noise control and one-click connect.
Free, open source, no account, no telemetry.

- Latest release - Downloads + Latest release + Downloads Windows 10 and 11 - MIT license + MIT license

- PodPilot popup showing AirPods Pro battery levels and which earbud is in your ear + Earlo popup showing AirPods Pro battery levels and which earbud is in your ear Popup with noise control buttons Popup for Samsung Galaxy Buds2 Pro

-## Why PodPilot +> **Earlo was called PodPilot** until version 0.4. The GitHub version updates itself to Earlo and keeps your settings; +> the Store version keeps updating through the Store. + +## Why Earlo Windows treats your AirPods like any other Bluetooth headset: no battery levels, no popup, no ear detection. -PodPilot brings back what you are used to from an iPhone, and adds the things Windows forgot. +Earlo brings back what you are used to from an iPhone, and adds the things Windows forgot. ### See everything at a glance - **Popup when you open the case**, just like on an iPhone: your earbuds, the case, charging state, in a clean Windows 11 card. +- **"Connected" notice** in the top right corner when your earbuds connect, with their battery levels. It disappears by itself. - **Every earbud, live**: in your ear, out of your ear or in the case, with its own battery level. - **Battery in the tray**: hover the icon for every level, or turn on the small battery bar on the icon itself. - **Low battery warnings** for each earbud and the case, before your music cuts out. @@ -40,7 +44,7 @@ PodPilot brings back what you are used to from an iPhone, and adds the things Wi - **Automatic ear detection**: take an earbud out and Spotify, YouTube, Netflix or any other app pauses. Put it back in and it plays on. - **Connect in one click** from the popup, or let your earbuds switch to the PC by themselves when you put them in, like on an iPhone. - **Disconnect in one click**, so your phone can have them back. -- **A volume indicator for stem swipes**: Windows changes the volume silently when you swipe; PodPilot shows it, like the volume keys do. +- **A volume indicator for stem swipes**: Windows changes the volume silently when you swipe; Earlo shows it, like the volume keys do. - **Noise control** (Off, Noise Cancellation, Transparency, Adaptive) and Conversation Awareness with the [experimental driver](#noise-control-it-works-but-windows-makes-it-hard). ### Made for Windows @@ -50,10 +54,10 @@ PodPilot brings back what you are used to from an iPhone, and adds the things Wi - **English and Dutch**, following your Windows language. Light and dark mode, the Windows 11 look. - **Updates itself**: the GitHub version installs new releases automatically (verified against their checksums), the Store version updates through the Store. - **Private by design**: no account, no telemetry, no cloud. The only internet traffic is the update check against GitHub ([privacy policy](PRIVACY.md)). -- **One file**: a single `PodPilot.exe`, no installer, no background services. +- **One file**: a single `Earlo.exe`, no installer, no background services.

- PodPilot settings window + Earlo settings window

@@ -73,7 +77,7 @@ PodPilot brings back what you are used to from an iPhone, and adds the things Wi | AirPods Max (Lightning and USB-C) | Beats Studio3, Studio Pro | |

- PodPilot popup for every supported model family + Earlo popup for every supported model family

AirPods and Beats released after this version still show their battery levels, as generic headphones. @@ -81,6 +85,26 @@ If that happens, please [open an issue](../../issues) with a diagnostics log (se Galaxy Buds are read over their own Bluetooth channel, so they need to be paired and connected to your PC; in return they report exact 1% battery levels. +## Questions + +**How do I see my AirPods battery level on Windows?** +Start Earlo and open the AirPods case near your PC. A popup shows the left and right earbud and the case, like on an iPhone, +and the tray icon shows the levels at any time. Pairing is not even needed for the battery levels. + +**Does AirPods ear detection work on Windows?** +Yes. Take an earbud out and Earlo pauses Spotify, YouTube, Netflix or any other app in the Windows media controls; put it back in and it plays on. + +**Can I switch AirPods noise cancellation on Windows?** +Yes: Off, Noise Cancellation, Transparency and Adaptive, plus Conversation Awareness, with Earlo's +[experimental driver](#noise-control-it-works-but-windows-makes-it-hard). + +**Does it work with Galaxy Buds and Beats?** +Yes. Beats earbuds and headphones work like AirPods. Galaxy Buds, from the 2019 Buds to the Buds3 Pro and Buds Core, +report exact battery levels once they are connected to your PC. + +**Is Earlo free?** +Yes, free and open source here on GitHub. The [Microsoft Store](#microsoft-store) version costs about €1 and funds signing the driver. + ## Install **Microsoft Store** (automatic updates, supports development): see [below](#microsoft-store). @@ -88,11 +112,11 @@ in return they report exact 1% battery levels. **GitHub** (free): 1. Download from the [latest release](../../releases/latest): - - `PodPilot-win-x64.zip`: standalone, runs on any PC. - - `PodPilot-win-x64-small.zip`: about 9 MB, but needs the [.NET 10 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/10.0) (Windows offers to install it on first start). + - `Earlo-win-x64.zip`: standalone, runs on any PC. + - `Earlo-win-x64-small.zip`: about 9 MB, but needs the [.NET 10 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/10.0) (Windows offers to install it on first start). - `win-arm64` versions for ARM PCs. -2. Unzip it anywhere, for example your Documents folder. It is a single `PodPilot.exe`. -3. Run `PodPilot.exe`. It lives in the notification area next to the clock (under the `^` arrow); click the icon to open it. +2. Unzip it anywhere, for example your Documents folder. It is a single `Earlo.exe`. +3. Run `Earlo.exe`. It lives in the notification area next to the clock (under the `^` arrow); click the icon to open it. Requirements: Windows 10 version 2004 or newer, or Windows 11, with a Bluetooth 4.0 (LE) adapter. @@ -103,25 +127,25 @@ Pairing is optional for AirPods battery levels, but needed for your device name, AirPods and Beats constantly broadcast a small Bluetooth LE message (Apple's "proximity pairing" message, manufacturer data `0x004C`, type `0x07`). It contains the model, the battery level of each earbud and the case in steps of 10%, charging flags, in-ear sensors and the lid state. -PodPilot reads it with the standard Windows Bluetooth APIs. This is the same data your iPhone uses for its popup. +Earlo reads it with the standard Windows Bluetooth APIs. This is the same data your iPhone uses for its popup. -Because the levels come in 10% steps (for example "80 to 89%"), PodPilot shows the middle of the range (85%), like MagicPods does. +Because the levels come in 10% steps (for example "80 to 89%"), Earlo shows the middle of the range (85%), like MagicPods does. | Part | File | | --- | --- | -| Message parser | [`ProximityPairingMessage.cs`](src/PodPilot.Core/Protocol/ProximityPairingMessage.cs) | -| Model list | [`DeviceCatalog.cs`](src/PodPilot.Core/Devices/DeviceCatalog.cs) | -| Smoothing, device selection, events | [`PodsTracker.cs`](src/PodPilot.Core/Tracking/PodsTracker.cs) | -| Bluetooth LE scanning | [`AdvertisementScanner.cs`](src/PodPilot.Core/Bluetooth/AdvertisementScanner.cs) | -| Media pause/resume | [`MediaController.cs`](src/PodPilot.Core/Media/MediaController.cs) | -| Galaxy Buds protocol | [`GalaxyBudsMessage.cs`](src/PodPilot.Core/Samsung/GalaxyBudsMessage.cs) | -| Connect button, volume indicator | [`AudioEndpoints.cs`](src/PodPilot.App/Services/AudioEndpoints.cs) | +| Message parser | [`ProximityPairingMessage.cs`](src/Earlo.Core/Protocol/ProximityPairingMessage.cs) | +| Model list | [`DeviceCatalog.cs`](src/Earlo.Core/Devices/DeviceCatalog.cs) | +| Smoothing, device selection, events | [`PodsTracker.cs`](src/Earlo.Core/Tracking/PodsTracker.cs) | +| Bluetooth LE scanning | [`AdvertisementScanner.cs`](src/Earlo.Core/Bluetooth/AdvertisementScanner.cs) | +| Media pause/resume | [`MediaController.cs`](src/Earlo.Core/Media/MediaController.cs) | +| Galaxy Buds protocol | [`GalaxyBudsMessage.cs`](src/Earlo.Core/Samsung/GalaxyBudsMessage.cs) | +| Connect button, volume indicator | [`AudioEndpoints.cs`](src/Earlo.App/Services/AudioEndpoints.cs) | ### Noise control: it works, but Windows makes it hard Switching noise control (Off, Noise Cancellation, Transparency, Adaptive), Conversation Awareness, Adaptive strength and exact 1% battery levels need Apple's AAP protocol over a Bluetooth L2CAP channel (PSM `0x1001`). -Windows does not let normal apps open L2CAP channels, so PodPilot has its own open-source kernel driver for it: see [`driver/`](driver/README.md). +Windows does not let normal apps open L2CAP channels, so Earlo has its own open-source kernel driver for it: see [`driver/`](driver/README.md).

Popup with noise control buttons @@ -129,8 +153,8 @@ Windows does not let normal apps open L2CAP channels, so PodPilot has its own op **The driver works.** Installing it is the hard part: Windows only loads drivers signed by Microsoft, and this one is not (yet, see below). On a PC with Secure Boot (almost every modern PC) you have to start Windows with "Disable driver signature enforcement" (F7 in Startup Settings), -and you have to do that again after every restart. The GitHub version of PodPilot has an **Install noise control driver** button in Settings -that does the rest for you. Without the driver, everything else in PodPilot works as usual. +and you have to do that again after every restart. The GitHub version of Earlo has an **Install noise control driver** button in Settings +that does the rest for you. Without the driver, everything else in Earlo works as usual. ## Help unlock noise control for everyone @@ -138,26 +162,26 @@ We figured out how to switch AirPods noise control on Windows, the thing people The only thing between you and a one-click install is a signature from Microsoft. To sign a driver, Microsoft requires an EV code signing certificate, and those cost up to **about €700 per year**, every year. Blame Microsoft. -With that signature the driver installs with one click, Secure Boot stays on and it keeps working after a restart. PodPilot even switches to the signed driver automatically. +With that signature the driver installs with one click, Secure Boot stays on and it keeps working after a restart. Earlo even switches to the signed driver automatically. -**Want to help?** Get PodPilot from the [Microsoft Store](#microsoft-store) for about €1. You get automatic updates through the Store, -and every purchase goes towards the signing certificate. PodPilot stays free and open source on GitHub, so it is your choice. +**Want to help?** Get Earlo from the [Microsoft Store](#microsoft-store) for about €1. You get automatic updates through the Store, +and every purchase goes towards the signing certificate. Earlo stays free and open source on GitHub, so it is your choice. > **Microsoft Store:** in review at Microsoft (submitted October 2026). The link will be here as soon as the listing is live. | Part | File | | --- | --- | -| AAP packets and parsing | [`AapPacket.cs`](src/PodPilot.Core/Aap/AapPacket.cs), [`AapMessage.cs`](src/PodPilot.Core/Aap/AapMessage.cs) | -| Session (handshake, state, commands) | [`AapSession.cs`](src/PodPilot.Core/Aap/AapSession.cs) | -| Driver client | [`DriverAapTransport.cs`](src/PodPilot.Core/Aap/DriverAapTransport.cs) | +| AAP packets and parsing | [`AapPacket.cs`](src/Earlo.Core/Aap/AapPacket.cs), [`AapMessage.cs`](src/Earlo.Core/Aap/AapMessage.cs) | +| Session (handshake, state, commands) | [`AapSession.cs`](src/Earlo.Core/Aap/AapSession.cs) | +| Driver client | [`DriverAapTransport.cs`](src/Earlo.Core/Aap/DriverAapTransport.cs) | | Kernel driver (KMDF) | [`driver/PodPilotAap`](driver/PodPilotAap) | ## Command-line options | Option | What it does | | --- | --- | -| `--minimized` | Still accepted for older autostart entries; PodPilot always starts in the tray now. | +| `--minimized` | Still accepted for older autostart entries; Earlo always starts in the tray now. | | `--demo` | Feed fake AirPods data, to try the app without headphones. | | `--log ` | Write every received AirPods message to a text file. Attach this to bug reports. | | `--render-preview ` | Render the popup for several models to PNG files. | @@ -168,16 +192,16 @@ and every purchase goes towards the signing certificate. PodPilot stays free and You need the [.NET 10 SDK](https://dotnet.microsoft.com/download). ```bash -git clone https://github.com/kylianxdev/PodPilot.git -cd PodPilot +git clone https://github.com/kylianxdev/Earlo.git +cd Earlo dotnet test -dotnet run --project src/PodPilot.App +dotnet run --project src/Earlo.App ``` Publish a self-contained build: ```bash -dotnet publish src/PodPilot.App -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o publish +dotnet publish src/Earlo.App -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o publish ``` ## Roadmap @@ -200,10 +224,11 @@ The message format is documented by the reverse-engineering work of the communit [OpenPods](https://github.com/adolfintel/OpenPods), [AirPodsDesktop](https://github.com/SpriteOvO/AirPodsDesktop), [LibrePods](https://github.com/kavishdevar/librepods) and [furiousMAC/continuity](https://github.com/furiousMAC/continuity). The Galaxy Buds message format is documented by [GalaxyBudsClient](https://github.com/timschneeb/GalaxyBudsClient) (no code was copied). -PodPilot is inspired by MagicPods, but shares no code with it. -The product renders in `src/PodPilot.App/Assets/Devices` are AI-generated illustrations, not Apple photos. +Earlo is inspired by MagicPods, but shares no code with it. +The AirPods and Beats renders in `src/Earlo.App/Assets/Devices` are AI-generated illustrations, not Apple photos. +The Galaxy Buds renders are 3D models made with [`tools/render-galaxy-buds.py`](tools/render-galaxy-buds.py) (Blender), not Samsung photos. ## License [MIT](LICENSE). AirPods, AirPods Pro, AirPods Max and Beats are trademarks of Apple Inc. Galaxy Buds is a trademark of Samsung. -PodPilot is an independent project and is not affiliated with or endorsed by Apple or Samsung. +Earlo is an independent project and is not affiliated with or endorsed by Apple or Samsung. diff --git a/docs/microsoft-store.md b/docs/microsoft-store.md index 5fa8d40..a733210 100644 --- a/docs/microsoft-store.md +++ b/docs/microsoft-store.md @@ -1,7 +1,7 @@ -# Publishing PodPilot in the Microsoft Store +# Publishing Earlo in the Microsoft Store -Everything PodPilot needs for the Store is already in the repository. Each CI run builds an unsigned -`PodPilot-store.msixbundle` (x64 and arm64); the Store signs it after upload, so no certificate is needed. +Everything Earlo needs for the Store is already in the repository. Each CI run builds an unsigned +`Earlo-store.msixbundle` (x64 and arm64); the Store signs it after upload, so no certificate is needed. The Store version has no noise-control driver (Store apps may not install drivers) and no self-updater (the Store updates it). Autostart uses the package's startup task instead of the registry. @@ -15,59 +15,92 @@ The Store version has no noise-control driver (Store apps may not install driver ## 2. Reserve the name 1. Partner Center > **Apps and games** > **New product** > **MSIX or PWA app**. -2. Reserve **PodPilot** (or a variant if it is taken). Don't use "AirPods" in the app name: it is Apple's trademark. +2. Reserve **Earlo** (or a variant if it is taken). Don't use "AirPods" in the app name: it is Apple's trademark. 3. Open **Product management** > **Product identity** and copy these three values into [`store/identity.json`](../store/identity.json): - `Package/Identity/Name` → `IdentityName` - `Package/Identity/Publisher` → `Publisher` (starts with `CN=`) - `Package/Properties/PublisherDisplayName` → `PublisherDisplayName` 4. Commit and push. The next CI run builds the bundle with your real identity. +### Renaming from PodPilot + +Earlo was published as PodPilot. The product keeps its identity (`KyliandeGroot.PodPilot`), so people who +installed PodPilot get Earlo as a normal update. Only the visible name changes: + +1. In the PodPilot product: **Product management** > **Manage app names** > reserve **Earlo**. +2. In the next submission's **Store listing**, choose **Earlo** as the product name, and upload a package + built from this repository (its manifest says `Earlo`; a package whose name is not reserved is rejected). +3. Once Earlo is live, you can delete the reserved name PodPilot under **Manage app names**. + ## 3. Fill in the submission | Section | What to enter | | --- | --- | | Pricing and availability | Price tier €0.99 (or whatever you choose), all markets | -| Properties | Category: **Utilities & tools**. Privacy policy URL: `https://github.com/kylianxdev/PodPilot/blob/main/PRIVACY.md` | +| Properties | Category: **Utilities & tools**. Privacy policy URL: `https://github.com/kylianxdev/Earlo/blob/main/PRIVACY.md` | | Age ratings | Questionnaire: no user content, no purchases, no location → usually rated 3+ | -| Packages | Upload `PodPilot-store.msixbundle` from the **store** artifact of the latest successful GitHub Actions run | +| Packages | Upload `Earlo-store.msixbundle` from the **store** artifact of the latest successful GitHub Actions run | | Store listing | Text below, screenshots from [`store/Screenshots`](../store/Screenshots), logo `store/Assets/StoreLogo.scale-200.png` | | Submission options | The package uses the restricted capability `runFullTrust`. Explain it with the text below | **runFullTrust justification** -> PodPilot is a WPF desktop app packaged as MSIX. It needs full trust to run as a desktop app with a notification-area icon, +> Earlo is a WPF desktop app packaged as MSIX. It needs full trust to run as a desktop app with a notification-area icon, > read Bluetooth LE advertisements from the user's wireless earbuds and pause or resume media playback when an earbud is removed. ## Store listing text +The Store search looks at the product name, the description and the search terms, so the device names people +type ("AirPods battery", "Galaxy Buds") are in the description itself, not only in the keywords. + +**Product name:** Earlo + **Short description** -> The iPhone battery popup for Windows: live battery levels and automatic ear detection for your wireless earbuds. +> The iPhone battery popup for Windows: live battery levels, ear detection and one-click connect for AirPods, Beats and Galaxy Buds. **Description** -> PodPilot brings the experience you know from the iPhone to Windows. +> Earlo brings the AirPods experience you know from the iPhone to Windows 10 and Windows 11, and works with Beats +> and Samsung Galaxy Buds too. > -> • A popup with the battery level of the left and right earbud and the case as soon as you open the case -> • Live battery level in the notification area +> • A battery popup as soon as you open the case: left earbud, right earbud and the case, with charging state +> • Live battery level of your earbuds and headphones in the notification area (system tray) > • See which earbud is in your ear, out of your ear or in the case -> • Automatic ear detection: take an earbud out and your music pauses, put it back in and it plays again (Spotify, YouTube, browsers and more) -> • Low battery warnings -> • Works with AirPods 1, 2, 3, 4, AirPods Pro 1, 2 and 3, AirPods Max and Beats earbuds and headphones -> • Starts with Windows, light and dark mode, Windows 11 design +> • Automatic ear detection: take an earbud out and your music pauses, put it back in and it plays again (Spotify, YouTube, Netflix, browsers and more) +> • Connect and disconnect your earbuds in one click +> • A "Connected" notice in the top right corner when your earbuds connect, with their battery levels +> • A volume indicator when you swipe the stem to change the volume +> • Low battery warnings for each earbud and the case +> • Works with AirPods 1, 2, 3 and 4, AirPods Pro 1, 2 and 3, AirPods Max, Beats earbuds and headphones (Powerbeats Pro, Beats Fit Pro, Studio Buds, Solo Buds, Studio Pro and more) and Samsung Galaxy Buds (Buds, Buds+, Buds Live, Buds Pro, Buds2, Buds2 Pro, Buds FE, Buds3, Buds3 Pro, Buds3 FE, Buds Core) +> • Starts with Windows, light and dark mode, Windows 11 design, English and Dutch > • No account, no ads, no tracking > -> PodPilot is open source: https://github.com/kylianxdev/PodPilot +> Earlo was called PodPilot before. It is open source: https://github.com/kylianxdev/Earlo > Buying it in the Store supports development and funds signing the noise-control driver. > -> AirPods and Beats are trademarks of Apple Inc. PodPilot is not affiliated with Apple. +> AirPods and Beats are trademarks of Apple Inc., Galaxy Buds of Samsung. Earlo is not affiliated with Apple or Samsung. + +**Search terms** (up to 7, at most 30 characters each; they are not shown to users) -**Keywords:** AirPods, battery, earbuds, Beats, Bluetooth, headphones, ear detection +| # | Term | +| --- | --- | +| 1 | AirPods battery | +| 2 | earbuds battery level | +| 3 | Galaxy Buds | +| 4 | ear detection | +| 5 | Bluetooth headphones battery | +| 6 | battery popup | +| 7 | wireless earbuds | + +The old name is only mentioned in the description: another app in the Store is called PodPilot, so using it as +a search term could count as misleading. If certification objects to a device brand in the search terms, +replace it with a generic term such as "noise cancelling". ## Updating -Bump `` in `src/PodPilot.App/PodPilot.App.csproj`, tag the release (`v1.2.3`), and upload the new -`PodPilot-store.msixbundle` as a new submission. The Store version number must always go up. +Bump `` in `src/Earlo.App/Earlo.App.csproj`, tag the release (`v1.2.3`), and upload the new +`Earlo-store.msixbundle` as a new submission. The Store version number must always go up. ## Testing the package locally (optional) diff --git a/docs/screenshots/all-models.png b/docs/screenshots/all-models.png index f19a787..d91462d 100644 Binary files a/docs/screenshots/all-models.png and b/docs/screenshots/all-models.png differ diff --git a/docs/screenshots/popup-galaxy-buds.png b/docs/screenshots/popup-galaxy-buds.png index 1557ab0..3cc63c4 100644 Binary files a/docs/screenshots/popup-galaxy-buds.png and b/docs/screenshots/popup-galaxy-buds.png differ diff --git a/driver/PodPilotAap/Driver.c b/driver/PodPilotAap/Driver.c index 76af5e3..f2a9ca8 100644 --- a/driver/PodPilotAap/Driver.c +++ b/driver/PodPilotAap/Driver.c @@ -1,10 +1,10 @@ /* - * PodPilot AAP bridge driver. + * Earlo AAP bridge driver. * * A KMDF Bluetooth profile driver that loads on the AirPods' vendor service (BTHENUM) and * opens Apple's AAP channel (L2CAP PSM 0x1001), which Windows does not expose to user mode. * It only moves raw packets between the channel and user mode; all protocol logic lives in - * PodPilot (src/PodPilot.Core/Aap). + * Earlo (src/Earlo.Core/Aap). * * Structure follows Microsoft's Bluetooth echo profile driver sample (bthecho). */ diff --git a/driver/PodPilotAap/PodPilotAap.inf b/driver/PodPilotAap/PodPilotAap.inf index c3385b7..dcb69d1 100644 --- a/driver/PodPilotAap/PodPilotAap.inf +++ b/driver/PodPilotAap/PodPilotAap.inf @@ -1,8 +1,8 @@ ; -; PodPilotAap.inf - PodPilot AAP bridge (Bluetooth profile driver for AirPods and Beats) +; PodPilotAap.inf - Earlo AAP bridge (Bluetooth profile driver for AirPods and Beats) ; ; Loads on the AirPods' vendor service {4715650b-5e9d-4ac2-b898-a4fc0aa5df78} and opens -; Apple's AAP channel (L2CAP PSM 0x1001) for PodPilot. +; Apple's AAP channel (L2CAP PSM 0x1001) for Earlo. ; [Version] @@ -24,9 +24,9 @@ DefaultDestDir = 13 PodPilotAap.sys = 1,, [Manufacturer] -%ProviderName% = PodPilot,NT$ARCH$.10.0...16299 +%ProviderName% = Earlo,NT$ARCH$.10.0...16299 -[PodPilot.NT$ARCH$.10.0...16299] +[Earlo.NT$ARCH$.10.0...16299] ; Any device exposing the AAP service %AapDevice.DeviceDesc% = PodPilotAap_Device, BTHENUM\{4715650b-5e9d-4ac2-b898-a4fc0aa5df78} ; Per model: VID 0x004C (Apple), PID = model id @@ -67,7 +67,7 @@ PodPilotAap.sys AddReg = PodPilotAap_Security [PodPilotAap_Security] -; SYSTEM and Administrators full access, interactive users read/write (PodPilot runs as the user) +; SYSTEM and Administrators full access, interactive users read/write (Earlo runs as the user) HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GRGW;;;IU)" [PodPilotAap_Device.NT.Services] @@ -87,7 +87,7 @@ KmdfService = PodPilotAap, PodPilotAap_WdfSection KmdfLibraryVersion = $KMDFVERSION$ [Strings] -ProviderName = "PodPilot" -DiskName = "PodPilot AAP Installation Disk" -AapDevice.DeviceDesc = "PodPilot AAP Bridge" -ServiceDesc = "PodPilot AAP Bridge Driver" +ProviderName = "Earlo" +DiskName = "Earlo AAP Installation Disk" +AapDevice.DeviceDesc = "Earlo AAP Bridge" +ServiceDesc = "Earlo AAP Bridge Driver" diff --git a/driver/PodPilotAap/Public.h b/driver/PodPilotAap/Public.h index c475f0a..f0110fe 100644 --- a/driver/PodPilotAap/Public.h +++ b/driver/PodPilotAap/Public.h @@ -1,6 +1,6 @@ /* - * PodPilot AAP bridge: interface shared between the kernel driver and user mode. - * Mirrored in C# by src/PodPilot.Core/Aap/DriverProtocol.cs. Keep both in sync. + * Earlo AAP bridge: interface shared between the kernel driver and user mode. + * Mirrored in C# by src/Earlo.Core/Aap/DriverProtocol.cs. Keep both in sync. * * One device interface exists per paired AirPods (the driver loads on the AirPods' AAP * service). User mode opens it, sends CONNECT to open L2CAP PSM 0x1001, then exchanges diff --git a/driver/README.md b/driver/README.md index 7f70569..460ec85 100644 --- a/driver/README.md +++ b/driver/README.md @@ -1,14 +1,14 @@ -# PodPilot AAP bridge driver +# Earlo AAP bridge driver Windows does not let normal apps open Bluetooth L2CAP channels. AirPods use one (PSM `0x1001`) for Apple's accessory protocol (AAP): noise control, Conversation Awareness, exact battery levels and more. This KMDF driver loads on the AirPods' vendor Bluetooth service -`{4715650b-5e9d-4ac2-b898-a4fc0aa5df78}`, opens that channel and passes raw packets to PodPilot. -All protocol logic lives in the app ([`src/PodPilot.Core/Aap`](../src/PodPilot.Core/Aap)). +`{4715650b-5e9d-4ac2-b898-a4fc0aa5df78}`, opens that channel and passes raw packets to Earlo. +All protocol logic lives in the app ([`src/Earlo.Core/Aap`](../src/Earlo.Core/Aap)). > **Status: works on real AirPods.** It is not signed by Microsoft yet, so it only loads after the F7 boot option (see below). -> Problems? Open an issue with a `--log` file from PodPilot. +> Problems? Open an issue with a `--log` file from Earlo. ## Interface @@ -30,14 +30,14 @@ Test-signed drivers only load with Windows test signing enabled, which lowers se (it can conflict with Secure Boot and game anti-cheat). 1. Pair your AirPods with Windows. -2. Download `PodPilotAap-driver-x64.zip` from the GitHub Actions artifacts or a release, and unzip it. +2. Download `Earlo-driver-x64.zip` from the GitHub Actions artifacts or a release, and unzip it. 3. Allow the test-signed driver, either way: - **One boot only, Secure Boot stays on:** Shift + Restart > Troubleshoot > Advanced options > Startup Settings > Restart > press **F7** ("Disable driver signature enforcement"). After the next normal restart everything is back to normal. - **Permanent:** `bcdedit /set testsigning on` and restart. With Secure Boot on, Windows refuses this ("protected by Secure Boot policy"); you would have to turn Secure Boot off in UEFI, which breaks some game anti-cheat (for example Riot Vanguard). -4. Easiest: in PodPilot, open Settings > Noise control > **Install noise control driver**. Or, in an administrator PowerShell in the unzipped folder: `powershell -ExecutionPolicy Bypass -File install-driver.ps1` (add `-Force` after the F7 boot). -5. Start PodPilot. Noise control buttons appear when the channel is open. +4. Easiest: in Earlo, open Settings > Noise control > **Install noise control driver**. Or, in an administrator PowerShell in the unzipped folder: `powershell -ExecutionPolicy Bypass -File install-driver.ps1` (add `-Force` after the F7 boot). +5. Start Earlo. Noise control buttons appear when the channel is open. If Memory integrity (Windows Security > Device security > Core isolation) is on, Windows may still block the driver. To remove it, run `uninstall-driver.ps1` (and `bcdedit /set testsigning off` if you turned it on). diff --git a/driver/install-driver.ps1 b/driver/install-driver.ps1 index dd93a0c..cf32b14 100644 --- a/driver/install-driver.ps1 +++ b/driver/install-driver.ps1 @@ -1,4 +1,4 @@ -# Installs the PodPilot AAP bridge driver (test-signed build). +# Installs the Earlo AAP bridge driver (test-signed build). # Run from the unzipped driver folder in an elevated PowerShell: # powershell -ExecutionPolicy Bypass -File install-driver.ps1 # @@ -39,5 +39,5 @@ pnputil /add-driver $inf /install if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010) { throw "pnputil failed with exit code $LASTEXITCODE" } Write-Host "" -Write-Host "Done. Make sure your AirPods are paired with Windows, open the case, then start PodPilot." -Write-Host "If nothing happens, check Device Manager > Bluetooth for 'PodPilot AAP Bridge'." +Write-Host "Done. Make sure your AirPods are paired with Windows, open the case, then start Earlo." +Write-Host "If nothing happens, check Device Manager > Bluetooth for 'Earlo AAP Bridge'." diff --git a/driver/uninstall-driver.ps1 b/driver/uninstall-driver.ps1 index eff1c53..b0e4c10 100644 --- a/driver/uninstall-driver.ps1 +++ b/driver/uninstall-driver.ps1 @@ -1,4 +1,4 @@ -# Removes the PodPilot AAP bridge driver. Run in an elevated PowerShell. +# Removes the Earlo AAP bridge driver. Run in an elevated PowerShell. #Requires -RunAsAdministrator $ErrorActionPreference = 'Stop' diff --git a/src/PodPilot.App/App.xaml b/src/Earlo.App/App.xaml similarity index 98% rename from src/PodPilot.App/App.xaml rename to src/Earlo.App/App.xaml index 009ded7..f67bc88 100644 --- a/src/PodPilot.App/App.xaml +++ b/src/Earlo.App/App.xaml @@ -1,4 +1,4 @@ - _connectedIds = []; + DateTime _bannerQuietUntil; AudioEndpoints.VolumeWatcher? _volumeWatcher; string? _volumeWatcherId; DateTime _osdQuietUntil; @@ -147,6 +152,8 @@ protected override void OnStartup(StartupEventArgs e) _paired.ConnectionChanged += (_, device) => Dispatcher.BeginInvoke(() => OnPairedConnectionChanged(device)); _paired.DevicesChanged += (_, _) => Dispatcher.BeginInvoke(Refresh); + // At start Windows reports the earbuds that are already connected; that is no news. + _bannerQuietUntil = DateTime.UtcNow.AddSeconds(8); _paired.Start(); _aap.Changed += (_, _) => Dispatcher.BeginInvoke(Refresh); _aap.SessionStarted += (_, session) => @@ -184,16 +191,16 @@ protected override void OnStartup(StartupEventArgs e) int logIndex = Array.IndexOf(e.Args, "--log"); if (logIndex >= 0) - DiagnosticsLog.Attach(_scanner, _aap, e.Args.ElementAtOrDefault(logIndex + 1) ?? "podpilot-log.txt"); + DiagnosticsLog.Attach(_scanner, _aap, e.Args.ElementAtOrDefault(logIndex + 1) ?? "earlo-log.txt"); if (e.Args.Contains("--demo")) DemoMode.Start(_tracker, Dispatcher); - // PodPilot lives in the tray: clicking the icon opens the window. + // Earlo lives in the tray: clicking the icon opens the window. if (!_settings.FirstRunDone) { _settings.FirstRunDone = true; - _tray.Notify("PodPilot", Strings.FirstRun); + _tray.Notify("Earlo", Strings.FirstRun); } Refresh(); } @@ -223,7 +230,7 @@ async System.Threading.Tasks.Task ConnectAsync(bool connect) await System.Threading.Tasks.Task.Delay(500); _connecting = _disconnecting = false; if (connect && _paired.ConnectedDevice is null) - _tray?.Notify("PodPilot", Strings.ConnectFailed(target.Name)); + _tray?.Notify("Earlo", Strings.ConnectFailed(target.Name)); Refresh(); } @@ -279,6 +286,7 @@ void OnUpdated(PodsSnapshot snapshot) } _lowBattery?.Check(snapshot, _paired.ConnectedDevice?.Name ?? snapshot.Device.Name); + _banner?.Update(CurrentState().Snapshot); Refresh(); } @@ -345,11 +353,11 @@ async System.Threading.Tasks.Task ToggleDriverAsync() if (ok) { _aap.RetryAll(); - _tray?.Notify("PodPilot", removing ? Strings.DriverRemoved : Strings.DriverInstalled); + _tray?.Notify("Earlo", removing ? Strings.DriverRemoved : Strings.DriverInstalled); } else { - _tray?.Notify("PodPilot", removing ? Strings.DriverRemoveFailed : Strings.DriverInstallFailed); + _tray?.Notify("Earlo", removing ? Strings.DriverRemoveFailed : Strings.DriverInstallFailed); } } @@ -371,6 +379,15 @@ async System.Threading.Tasks.Task SendAap(Func= _bannerQuietUntil) + { + _banner ??= new ConnectedBannerWindow(); + _banner.Present(device.Name, CurrentState().Snapshot); + } + if (device.IsConnected) _aap.RetryAll(); _ = _galaxy.EnsureAsync(_paired.Devices); diff --git a/src/PodPilot.App/AppSettings.cs b/src/Earlo.App/AppSettings.cs similarity index 88% rename from src/PodPilot.App/AppSettings.cs rename to src/Earlo.App/AppSettings.cs index 7640364..640384e 100644 --- a/src/PodPilot.App/AppSettings.cs +++ b/src/Earlo.App/AppSettings.cs @@ -4,14 +4,14 @@ using System.Runtime.CompilerServices; using System.Text.Json; using System.Text.Json.Serialization; -using PodPilot.App.Services; +using Earlo.App.Services; -namespace PodPilot.App; +namespace Earlo.App; -///

User settings, saved as JSON in %APPDATA%\PodPilot. Saves itself on every change. +/// User settings, saved as JSON in %APPDATA%\Earlo. Saves itself on every change. public sealed class AppSettings : INotifyPropertyChanged { - static readonly string Folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PodPilot"); + static readonly string Folder = DataFolder.Root; static readonly string FilePath = Path.Combine(Folder, "settings.json"); bool _startWithWindows = true; @@ -31,6 +31,7 @@ public sealed class AppSettings : INotifyPropertyChanged bool _autoUpdate = true; bool _autoConnect; bool _volumeOsd = true; + bool _connectedBanner = true; public bool StartWithWindows { get => _startWithWindows; set => Set(ref _startWithWindows, value); } public bool PopupOnLidOpen { get => _popupOnLidOpen; set => Set(ref _popupOnLidOpen, value); } @@ -64,6 +65,9 @@ public sealed class AppSettings : INotifyPropertyChanged /// Show a volume indicator when the volume changes from the earbuds (stem swipe), which Windows does not show. public bool VolumeOsd { get => _volumeOsd; set => Set(ref _volumeOsd, value); } + /// Show a "Connected" notice in the top right corner when earbuds connect to this PC. + public bool ConnectedBanner { get => _connectedBanner; set => Set(ref _connectedBanner, value); } + [JsonIgnore] public bool Persist { get; set; } = true; @@ -75,7 +79,7 @@ public static AppSettings Load() try { if (File.Exists(FilePath)) - return JsonSerializer.Deserialize(File.ReadAllText(FilePath), PodPilotJsonContext.Default.AppSettings) ?? new AppSettings(); + return JsonSerializer.Deserialize(File.ReadAllText(FilePath), EarloJsonContext.Default.AppSettings) ?? new AppSettings(); } catch (Exception) { @@ -98,7 +102,7 @@ public void Save() try { Directory.CreateDirectory(Folder); - File.WriteAllText(FilePath, JsonSerializer.Serialize(this, PodPilotJsonContext.Default.AppSettings)); + File.WriteAllText(FilePath, JsonSerializer.Serialize(this, EarloJsonContext.Default.AppSettings)); } catch (IOException) { diff --git a/src/PodPilot.App/Assets/Devices/airpods-2.png b/src/Earlo.App/Assets/Devices/airpods-2.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/airpods-2.png rename to src/Earlo.App/Assets/Devices/airpods-2.png diff --git a/src/PodPilot.App/Assets/Devices/airpods-3.png b/src/Earlo.App/Assets/Devices/airpods-3.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/airpods-3.png rename to src/Earlo.App/Assets/Devices/airpods-3.png diff --git a/src/PodPilot.App/Assets/Devices/airpods-4.png b/src/Earlo.App/Assets/Devices/airpods-4.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/airpods-4.png rename to src/Earlo.App/Assets/Devices/airpods-4.png diff --git a/src/PodPilot.App/Assets/Devices/airpods-max.png b/src/Earlo.App/Assets/Devices/airpods-max.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/airpods-max.png rename to src/Earlo.App/Assets/Devices/airpods-max.png diff --git a/src/PodPilot.App/Assets/Devices/airpods-pro-2.png b/src/Earlo.App/Assets/Devices/airpods-pro-2.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/airpods-pro-2.png rename to src/Earlo.App/Assets/Devices/airpods-pro-2.png diff --git a/src/PodPilot.App/Assets/Devices/airpods-pro.png b/src/Earlo.App/Assets/Devices/airpods-pro.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/airpods-pro.png rename to src/Earlo.App/Assets/Devices/airpods-pro.png diff --git a/src/PodPilot.App/Assets/Devices/beats-fit-pro.png b/src/Earlo.App/Assets/Devices/beats-fit-pro.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/beats-fit-pro.png rename to src/Earlo.App/Assets/Devices/beats-fit-pro.png diff --git a/src/PodPilot.App/Assets/Devices/beats-flex.png b/src/Earlo.App/Assets/Devices/beats-flex.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/beats-flex.png rename to src/Earlo.App/Assets/Devices/beats-flex.png diff --git a/src/PodPilot.App/Assets/Devices/beats-headphones.png b/src/Earlo.App/Assets/Devices/beats-headphones.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/beats-headphones.png rename to src/Earlo.App/Assets/Devices/beats-headphones.png diff --git a/src/PodPilot.App/Assets/Devices/beats-studio-buds.png b/src/Earlo.App/Assets/Devices/beats-studio-buds.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/beats-studio-buds.png rename to src/Earlo.App/Assets/Devices/beats-studio-buds.png diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds-core.png b/src/Earlo.App/Assets/Devices/galaxy-buds-core.png new file mode 100644 index 0000000..bc68423 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds-core.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds-fe.png b/src/Earlo.App/Assets/Devices/galaxy-buds-fe.png new file mode 100644 index 0000000..74764f8 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds-fe.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds-live.png b/src/Earlo.App/Assets/Devices/galaxy-buds-live.png new file mode 100644 index 0000000..0438650 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds-live.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds-plus.png b/src/Earlo.App/Assets/Devices/galaxy-buds-plus.png new file mode 100644 index 0000000..7752773 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds-plus.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds-pro.png b/src/Earlo.App/Assets/Devices/galaxy-buds-pro.png new file mode 100644 index 0000000..5487c73 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds-pro.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds.png b/src/Earlo.App/Assets/Devices/galaxy-buds.png new file mode 100644 index 0000000..1d1ca35 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds2-pro.png b/src/Earlo.App/Assets/Devices/galaxy-buds2-pro.png new file mode 100644 index 0000000..65d0fb4 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds2-pro.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds2.png b/src/Earlo.App/Assets/Devices/galaxy-buds2.png new file mode 100644 index 0000000..a0e7bd0 Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds2.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds3-fe.png b/src/Earlo.App/Assets/Devices/galaxy-buds3-fe.png new file mode 100644 index 0000000..5f773fa Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds3-fe.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds3-pro.png b/src/Earlo.App/Assets/Devices/galaxy-buds3-pro.png new file mode 100644 index 0000000..0036f1f Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds3-pro.png differ diff --git a/src/Earlo.App/Assets/Devices/galaxy-buds3.png b/src/Earlo.App/Assets/Devices/galaxy-buds3.png new file mode 100644 index 0000000..1a3a33d Binary files /dev/null and b/src/Earlo.App/Assets/Devices/galaxy-buds3.png differ diff --git a/src/PodPilot.App/Assets/Devices/powerbeats-pro.png b/src/Earlo.App/Assets/Devices/powerbeats-pro.png similarity index 100% rename from src/PodPilot.App/Assets/Devices/powerbeats-pro.png rename to src/Earlo.App/Assets/Devices/powerbeats-pro.png diff --git a/src/PodPilot.App/Assets/podpilot.ico b/src/Earlo.App/Assets/earlo.ico similarity index 100% rename from src/PodPilot.App/Assets/podpilot.ico rename to src/Earlo.App/Assets/earlo.ico diff --git a/src/Earlo.App/ConnectedBannerWindow.xaml b/src/Earlo.App/ConnectedBannerWindow.xaml new file mode 100644 index 0000000..f80ee6e --- /dev/null +++ b/src/Earlo.App/ConnectedBannerWindow.xaml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Earlo.App/ConnectedBannerWindow.xaml.cs b/src/Earlo.App/ConnectedBannerWindow.xaml.cs new file mode 100644 index 0000000..77d490b --- /dev/null +++ b/src/Earlo.App/ConnectedBannerWindow.xaml.cs @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Interop; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Threading; +using Earlo.App.Controls; +using Earlo.App.Services; +using Earlo.Core.Samsung; +using Earlo.Core.Tracking; + +namespace Earlo.App; + +/// +/// "Connected" banner in the top right corner when earbuds connect to this PC, with their battery levels. +/// It slides in, stays a few seconds and fades away by itself; it never takes focus or clicks. +/// +public partial class ConnectedBannerWindow : Window +{ + readonly DispatcherTimer _hideTimer = new() { Interval = TimeSpan.FromSeconds(4) }; + string _name = string.Empty; + + public ConnectedBannerWindow() + { + InitializeComponent(); + _hideTimer.Tick += (_, _) => FadeOut(); + SourceInitialized += (_, _) => + { + // Never take focus or clicks: it is only a notice. + var hwnd = new WindowInteropHelper(this).Handle; + const int GWL_EXSTYLE = -20, WS_EX_TRANSPARENT = 0x20, WS_EX_TOOLWINDOW = 0x80, WS_EX_NOACTIVATE = 0x08000000; + SetWindowLongW(hwnd, GWL_EXSTYLE, GetWindowLongW(hwnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE); + }; + } + + public void Present(string name, PodsSnapshot? snapshot) + { + SetContent(name, snapshot); + _hideTimer.Stop(); + if (!IsVisible) + { + Opacity = 0; + Show(); + } + ScreenPlacement.PlaceTopRight(this); + + BeginAnimation(OpacityProperty, new DoubleAnimation(1, TimeSpan.FromMilliseconds(200))); + Slide.BeginAnimation(TranslateTransform.XProperty, + new DoubleAnimation(40, 0, TimeSpan.FromMilliseconds(300)) { EasingFunction = new CubicEase { EasingMode = EasingMode.EaseOut } }); + _hideTimer.Start(); + } + + /// Battery levels often arrive a moment after the connection; fills them in while the banner shows. + public void Update(PodsSnapshot? snapshot) + { + if (!IsVisible || snapshot is null) + return; + string before = StatusText.Text; + SetContent(_name, snapshot); + if (StatusText.Text != before) + ScreenPlacement.PlaceTopRight(this); // the card may have grown + } + + public void SetContent(string name, PodsSnapshot? snapshot) + { + _name = name; + NameText.Text = name; + string battery = BatteryText(snapshot); + StatusText.Text = battery.Length == 0 ? Strings.BannerConnected : $"{Strings.BannerConnected} · {battery}"; + + // Galaxy Buds tell their model by name; AirPods and Beats once their first advertisement is in. + var render = snapshot is not null ? DeviceImages.For(snapshot.Device.ModelId) + : GalaxyBudsModels.FromPairedName(name) is { } galaxy ? DeviceImages.For(GalaxyBudsModels.CatalogId(galaxy)) + : null; + Render.Source = render; + Glyph.Visibility = render is null ? Visibility.Visible : Visibility.Collapsed; + } + + static string BatteryText(PodsSnapshot? snapshot) + { + if (snapshot is null) + return string.Empty; + if (snapshot.Device.HasSingleBattery) + return snapshot.Single.IsKnown ? $"{snapshot.Single.Percent}%" : string.Empty; + + var parts = new List(); + if (snapshot.Left.IsKnown) + parts.Add($"{Strings.ShortLeft} {snapshot.Left.Percent}%"); + if (snapshot.Right.IsKnown) + parts.Add($"{Strings.ShortRight} {snapshot.Right.Percent}%"); + if (snapshot.Case.IsKnown) + parts.Add($"{Strings.Case} {snapshot.Case.Percent}%"); + return string.Join(" ", parts); + } + + void FadeOut() + { + _hideTimer.Stop(); + var fade = new DoubleAnimation(0, TimeSpan.FromMilliseconds(250)); + fade.Completed += (_, _) => + { + if (Opacity == 0) + Hide(); + }; + BeginAnimation(OpacityProperty, fade); + } + + [System.Runtime.InteropServices.DllImport("user32.dll")] + static extern int GetWindowLongW(IntPtr hwnd, int index); + + [System.Runtime.InteropServices.DllImport("user32.dll")] + static extern int SetWindowLongW(IntPtr hwnd, int index, int value); +} diff --git a/src/PodPilot.App/Controls/BatteryBar.xaml b/src/Earlo.App/Controls/BatteryBar.xaml similarity index 97% rename from src/PodPilot.App/Controls/BatteryBar.xaml rename to src/Earlo.App/Controls/BatteryBar.xaml index f0b71b8..68e34f3 100644 --- a/src/PodPilot.App/Controls/BatteryBar.xaml +++ b/src/Earlo.App/Controls/BatteryBar.xaml @@ -1,4 +1,4 @@ - diff --git a/src/PodPilot.App/Controls/BatteryBar.xaml.cs b/src/Earlo.App/Controls/BatteryBar.xaml.cs similarity index 98% rename from src/PodPilot.App/Controls/BatteryBar.xaml.cs rename to src/Earlo.App/Controls/BatteryBar.xaml.cs index 8e5da5d..3b478df 100644 --- a/src/PodPilot.App/Controls/BatteryBar.xaml.cs +++ b/src/Earlo.App/Controls/BatteryBar.xaml.cs @@ -2,9 +2,9 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Media.Animation; -using PodPilot.Core.Tracking; +using Earlo.Core.Tracking; -namespace PodPilot.App.Controls; +namespace Earlo.App.Controls; public partial class BatteryBar : UserControl { diff --git a/src/PodPilot.App/Controls/DeviceArt.xaml b/src/Earlo.App/Controls/DeviceArt.xaml similarity index 99% rename from src/PodPilot.App/Controls/DeviceArt.xaml rename to src/Earlo.App/Controls/DeviceArt.xaml index 8c9ed3f..2e9a601 100644 --- a/src/PodPilot.App/Controls/DeviceArt.xaml +++ b/src/Earlo.App/Controls/DeviceArt.xaml @@ -1,4 +1,4 @@ - diff --git a/src/PodPilot.App/Controls/DeviceArt.xaml.cs b/src/Earlo.App/Controls/DeviceArt.xaml.cs similarity index 97% rename from src/PodPilot.App/Controls/DeviceArt.xaml.cs rename to src/Earlo.App/Controls/DeviceArt.xaml.cs index 1d70242..edacebd 100644 --- a/src/PodPilot.App/Controls/DeviceArt.xaml.cs +++ b/src/Earlo.App/Controls/DeviceArt.xaml.cs @@ -1,9 +1,9 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Media; -using PodPilot.Core.Devices; +using Earlo.Core.Devices; -namespace PodPilot.App.Controls; +namespace Earlo.App.Controls; public partial class DeviceArt : UserControl { diff --git a/src/PodPilot.App/Controls/DeviceImages.cs b/src/Earlo.App/Controls/DeviceImages.cs similarity index 79% rename from src/PodPilot.App/Controls/DeviceImages.cs rename to src/Earlo.App/Controls/DeviceImages.cs index c08dba5..8650735 100644 --- a/src/PodPilot.App/Controls/DeviceImages.cs +++ b/src/Earlo.App/Controls/DeviceImages.cs @@ -3,7 +3,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; -namespace PodPilot.App.Controls; +namespace Earlo.App.Controls; /// Photorealistic renders per model family (Assets/Devices). Unknown models fall back to vector art. public static class DeviceImages @@ -36,6 +36,19 @@ public static class DeviceImages [0x0520] = "beats-flex", [0x0D20] = "beats-flex", [0x1020] = "beats-flex", + + // Galaxy Buds, by GalaxyBudsModels.CatalogId (rendered with tools/render-galaxy-buds.py). + [0x5300] = "galaxy-buds", + [0x5301] = "galaxy-buds-plus", + [0x5302] = "galaxy-buds-live", + [0x5303] = "galaxy-buds-pro", + [0x5304] = "galaxy-buds2", + [0x5305] = "galaxy-buds2-pro", + [0x5306] = "galaxy-buds-fe", + [0x5307] = "galaxy-buds3", + [0x5308] = "galaxy-buds3-pro", + [0x5309] = "galaxy-buds3-fe", + [0x530A] = "galaxy-buds-core", }; static readonly Dictionary Cache = []; diff --git a/src/PodPilot.App/Controls/DevicePanel.xaml b/src/Earlo.App/Controls/DevicePanel.xaml similarity index 94% rename from src/PodPilot.App/Controls/DevicePanel.xaml rename to src/Earlo.App/Controls/DevicePanel.xaml index a5e8faf..68bfbd7 100644 --- a/src/PodPilot.App/Controls/DevicePanel.xaml +++ b/src/Earlo.App/Controls/DevicePanel.xaml @@ -1,8 +1,8 @@ - + xmlns:c="clr-namespace:Earlo.App.Controls" + xmlns:app="clr-namespace:Earlo.App"> diff --git a/src/PodPilot.App/Controls/DevicePanel.xaml.cs b/src/Earlo.App/Controls/DevicePanel.xaml.cs similarity index 95% rename from src/PodPilot.App/Controls/DevicePanel.xaml.cs rename to src/Earlo.App/Controls/DevicePanel.xaml.cs index 1ea8fcf..e186f29 100644 --- a/src/PodPilot.App/Controls/DevicePanel.xaml.cs +++ b/src/Earlo.App/Controls/DevicePanel.xaml.cs @@ -1,14 +1,14 @@ using System; using System.Windows; using System.Windows.Controls; -using PodPilot.Core.Aap; -using PodPilot.Core.Bluetooth; -using PodPilot.Core.Devices; -using PodPilot.Core.Tracking; +using Earlo.Core.Aap; +using Earlo.Core.Bluetooth; +using Earlo.Core.Devices; +using Earlo.Core.Tracking; -namespace PodPilot.App.Controls; +namespace Earlo.App.Controls; -/// Everything PodPilot knows about the current device: artwork, batteries and connection. +/// Everything Earlo knows about the current device: artwork, batteries and connection. public partial class DevicePanel : UserControl { public DevicePanel() diff --git a/src/PodPilot.App/Controls/NoiseControlBar.xaml b/src/Earlo.App/Controls/NoiseControlBar.xaml similarity index 97% rename from src/PodPilot.App/Controls/NoiseControlBar.xaml rename to src/Earlo.App/Controls/NoiseControlBar.xaml index 5b8ee49..5a2b890 100644 --- a/src/PodPilot.App/Controls/NoiseControlBar.xaml +++ b/src/Earlo.App/Controls/NoiseControlBar.xaml @@ -1,7 +1,7 @@ - + xmlns:app="clr-namespace:Earlo.App">