Commit Graph
246 Commits
Author SHA1 Message Date
Michatec 1a214d1683 feat: implement station stream health checking
- Add `StationHealthChecker` to asynchronously test station stream availability, response codes, and latency.
- Add long-click listener on the save button in `CollectionAdapter` to trigger health checks and display results via `Snackbar`.
- Add localized string resources for stream health check status UI messages.
- Update `provider_paths.xml` to include internal files and cache directory paths for FileProvider.
2026-11-05 18:12:39 +01:00
Michatec d69a8dfe77 fix: station UUID existence validation before playback 2026-10-31 23:53:43 +01:00
Michatec d80e5e2e17 fix: dispatch PlaybackController calls to main thread 2026-10-31 23:24:23 +01:00
Michatec ba1dd4e9eb fix: remove runBlocking(Main) from PlaybackController to prevent main thread deadlock 2026-10-31 23:09:36 +01:00
Michatec 0f6f774e73 feat: implement intent-based playback control for PlayerService
- Add handling for `PLAY` and `PLAY_STATION` actions in `PlayerService.onStartCommand`.
- Update `RadioApiService` to trigger playback via intents when `playbackController` is not yet initialized.
- Add `startPlayerService` helper method in `RadioApiService` to encapsulate service starting logic.
2026-10-31 22:42:41 +01:00
Michatec e315c7a037 test: include Android resources in unit tests
- Set `isIncludeAndroidResources` to `true` within `testOptions` in `app/build.gradle.kts`.
2026-10-31 22:35:52 +01:00
Michatec a9a228bba2 refactor: remove artificial delay when starting playback in RadioApiService
- Remove 500ms delay when calling `play()` and `playStationByUuid()`.
- Remove unused `Handler`, `Looper`, and `Keys` imports.
- Reorder helper imports for consistency.
2026-10-31 22:25:05 +01:00
Michatec 91c33d4abf fix: delay playback initiation and use playbackController directly
- Add a 500ms delay using `Handler` before triggering playback actions to ensure controller availability.
- Remove `EXTRA_STATION_UUID` from the `PlayerService` start intent.
- Transition to calling `playbackController.play()` and `playbackController.playStationByUuid(uuid)` directly.
2026-10-31 22:08:03 +01:00
Michatec aec4fadf18 refactor: remove intent-based play commands from PlayerService
- Remove `EXTRA_PLAY_COMMAND`, `PLAY_COMMAND_PLAY`, and `PLAY_COMMAND_PLAY_STATION` constants from `Keys.kt`.
- Remove manual play command handling in `PlayerService.onStartCommand`.
- Simplify `PlayerService` start intents in `RadioApiService` by removing unnecessary play command extras.
2026-10-31 21:57:22 +01:00
Michatec 04a1aa3dde feat: implement command-based playback triggering in PlayerService
- Add `EXTRA_PLAY_COMMAND`, `PLAY_COMMAND_PLAY`, and `PLAY_COMMAND_PLAY_STATION` constants to `Keys.kt`.
- Update `PlayerService.onStartCommand` to process playback commands from intent extras.
- Modify `RadioApiService` to pass playback commands when starting `PlayerService`.
2026-10-31 21:43:48 +01:00
Michatec f2d926d8ba fix: use media title for current track metadata
- Update `PlayerService` to return the media title instead of artist in `getCurrentMetadata`.
- Refactor `RemoteControlServer` to retrieve `currentTrack` directly from media metadata instead of loading from metadata history.
2026-10-31 21:22:29 +01:00
Michatec 008ac4bc34 fix: prevent station name from being added to metadata history
- Skip adding metadata to the history list if the metadata string matches the current station name.
- Move `currentMediaItem` retrieval earlier in the processing logic to facilitate the station name comparison.
2026-10-31 21:07:47 +01:00
Michatec 33ff113989 feat: implement metadata history tracking and UI updates
- Add `updateMetadata` function to `LayoutHolder` to handle metadata persistence in `metadataHistory` and update UI views.
- Implement `onMediaMetadataChanged` in `PlayerFragment` to trigger metadata updates from the media controller.
- Integrate history management logic to save unique metadata entries and enforce maximum history size via `PreferencesHelper`.
2026-10-31 21:01:56 +01:00
Michatec eed4b097b8 fix: improve station name retrieval for media metadata updates
- Update `PlayerService.kt` to fetch the station name from the collection using `mediaId` via `CollectionHelper`.
- Fall back to the existing artist metadata if the retrieved station name is empty.
2026-10-31 20:42:39 +01:00
Michatec 34aa8cde03 feat: update media metadata dynamically during playback
- Update the current `MediaItem` in `PlayerService.kt` when new metadata is received.
- Set the original station name as the artist and the new metadata string as the title and display title.
- Replace the current media item in the player to ensure UI components reflect the updated metadata.
2026-10-31 20:34:22 +01:00
Michatec 0125e97307 fix: execute PlaybackController methods on the main thread
- Wrap all overridden methods in `RadioApiService.PlaybackController` with `runBlocking(Main)`.
- Ensure player operations and media metadata retrievals in `PlayerService` execute safely on the main thread.
2026-10-31 19:57:42 +01:00
Michatec 143484a37f feat: add AIDL API service and refactor Shizuku power management
- Introduce the `IRadioApi` AIDL interface and `RadioApiService` to support external IPC playback control and station metadata retrieval.
- Connect `PlayerService` to `RadioApiService` using an internal `PlaybackController` callback interface.
- Extract background battery optimization logic from `Shizuku` into a dedicated `RadioPowerManager` class featuring atomic backup, restoration, and rollback capabilities.
- Update `ShizukuFragment` to execute power optimization tasks asynchronously via Kotlin coroutines.
- Enable AIDL feature support in Gradle, add documentation in `API_DOC.md`, and include `junit` and `mockito-core` test dependencies.
2026-10-31 19:35:16 +01:00
Michatec f1810dcd20 feat: add Shizuku integration for background playback optimization
- Implement `Shizuku` helper and `ShizukuFragment` using Jetpack Compose to manage system permissions and Doze mode battery optimization whitelisting.
- Add Shizuku API and provider dependencies, manifest provider configuration, vector icon, and localized strings.
- Add Shizuku preference entry to `SettingsFragment` and navigation graph.
- Update QR code verification logic to show a toast message on Android TV instead of hiding the preference.
2026-10-29 19:48:21 +01:00
Michatec 8640368a50 refactor: cleanup constants and simplify preference logic
- Remove unused `ACTION_REMOTE_SERVER_ERROR` and `ACTION_REMOTE_AUTH_FAILED` constants from `Keys.kt`.
- Simplify `constantTimeEquals` implementation in `SettingsFragment.kt`.
- Refactor `preferenceEnableEditingStreamUri` enablement logic to use a concise boolean expression.
2026-10-24 19:43:13 +02:00
Michatec 575af5f53a refactor: replace LocalBroadcastManager with AppEventBus for internal communication 2026-10-22 14:47:52 +02:00
Michatec 36b108f1d6 Merge remote-tracking branch 'origin/main' 2026-09-30 09:31:29 +02:00
Michatec 65045c4387 docs: update pairing documentation and adjust settings UI layout
- Rename "server app" to "Radio app" in pairing documentation.
- Simplify security warning in documentation.
- Fix grammar (short-lived).
- Unconditionally add QR verification preference to the Remote Control settings category.
2026-09-30 09:31:10 +02:00
Michachatz a46f227a33 Enable hardware acceleration in AndroidManifest.xml 2026-09-30 07:24:57 +02:00
Michatec 75e839d5cc feat: implement QR code pairing for remote control
- Add `QrCaptureActivity` to support scanning QR codes for authentication.
- Implement `PairingManager` to handle short-lived pairing sessions.
- Expose new API endpoints for pairing start, status polling, and QR image generation.
- Add UI modal to the web interface for pairing code input and QR code display.
- Increase Gradle JVM heap size to 4096m.
- Include necessary permissions and dependencies for barcode scanning.
2026-09-29 19:38:39 +02:00
Michatec 6f59fd95a9 refactor(layout): rename loading_layout ID to loadingLayout in activity_main.xml 2026-09-29 17:08:59 +02:00
Michatec 8298a1cae8 refactor: import Collection in RemoteControlServer 2026-09-29 16:41:45 +02:00
Michatec 21b5bdacb0 refactor: move web assets into css and js subdirectories 2026-09-17 15:55:10 +02:00
Michatec 8056299177 feat(web): add web streaming support and refactor frontend modules
- Implement `/api/stream` endpoint to provide the current station's audio URI.
- Refactor the frontend into modular `api.js`, `ui.js`, and `script.js` files.
- Add a "Listen on Web" feature to play radio streams directly in the browser.
- Update the backend to serve and whitelist new JavaScript assets.
- Add multi-language translations for the web streaming toggle.
2026-09-17 15:50:32 +02:00
Michatec 642018b965 chore: convert launcher and banner icons from PNG to WebP 2026-09-17 14:11:11 +02:00
Michatec 5e66fc35d3 chore: downgrade Java compatibility to v21 and update packaging excludes 2026-09-17 14:05:27 +02:00
Michatec 0b4f85c9b3 chore: update java-jdk to v25 and exclude native-image resources 2026-09-17 13:52:55 +02:00
Michatec bf02145c79 chore: simplify license resource exclusions using wildcard 2026-09-17 13:38:31 +02:00
Michachatz a305caf376 Fix exclude path for LICENSE.base64.txt 2026-09-17 13:19:39 +02:00
Michachatz d0f713d4bf Remove exclusion for LICENSE.base64.txt 2026-09-17 13:10:39 +02:00
Michachatz 10c9759587 Remove exclusion for LICENSE.webbit.txt 2026-09-17 13:03:43 +02:00
Michachatz 2e7c7d72cf Exclude LICENSE.jbzip2.txt from packaging resources 2026-09-17 12:56:03 +02:00
Michatec 98754f9782 refactor(ui): optimize theme calculation and handle cast session termination
- Wrap color scheme calculation in `remember` to prevent unnecessary recomputations in `AppTheme`.
- Add a `SessionManagerListener` to `CustomCastControllerDialogFragment` to automatically dismiss the dialog when a cast session ends or is suspended.
- Clean up imports in `CustomCastControllerDialogFragment`.
2026-09-16 19:03:47 +02:00
Michatec 45dafe486d feat(ui): migrate cast dialogs to Compose and refactor app theme logic
- Migrate `CustomCastChooserDialogFragment` and `CustomCastControllerDialogFragment` from View-based to Jetpack Compose.
- Create `CastComposables.kt` containing new Compose UI for Cast device selection and volume control.
- Remove legacy XML layouts `dialog_cast_chooser.xml`, `dialog_cast_connected.xml`, and `item_cast_device.xml`.
- Refactor `AppTheme.kt` to simplify color scheme logic and wrap content in a `Surface`.
- Add `ic_shader_24dp.xml` and update the shader effect preference icon in `SettingsFragment`.
- Adjust `windowLightStatusBar` and `windowLightNavigationBar` in night theme styles.
2026-09-16 18:45:36 +02:00
Michatec 7345c3e52f feat: add shader effect toggle in settings
- Add `PREF_SHADER_EFFECT` key and helper method to `PreferencesHelper`.
- Implement visibility and animation logic in `LayoutHolder` based on the shader effect preference.
- Add "Shader Effect" switch preference to `SettingsFragment`.
- Update `PlayerFragment` to refresh views when the shader effect setting changes.
- Add localized strings for the new setting in multiple languages.
2026-09-16 18:01:36 +02:00
Michatec df498d8592 Bump version to 15.2 and update Java compatibility to version 21 2026-08-29 18:21:22 +03:00
Michatec b7fb058546 Enhance notification system with custom sound and refactor logging tags
- Added a custom notification sound resource and configured `AudioAttributes` for the notification channel.
- Localized the notification channel name using string resources across multiple languages.
- Increased notification channel importance from `LOW` to `DEFAULT`.
- Refactored `TAG` constants in `ExtrasHelper` and `NativeAudioProcessor` to use dynamic class names.
2026-08-29 18:16:51 +03:00
Michatec 1eb0ad554b feat(ui): improve accessibility in AboutFragment
Add focusable modifiers to interactive elements in AboutFragment to improve navigation support.

- Added `.focusable()` to the logo, contact cards, and external link elements.
- Cleaned up imports and method signatures in AboutFragment.kt.
2026-08-17 19:34:28 +02:00
Michatec 408df31946 feat(ui): add About screen and fix metadata history handling
- Add AboutFragment with Compose UI including app info, FAQ, supported
  formats, Android TV controls, and credits
- Add navigation from Settings to About screen
- Fix PlayerService to skip empty/"null" metadata entries
- Improve PreferencesHelper.loadMetadataHistory() with type-safe
  deserialization and null filtering
- Add material-icons-extended dependency and localized strings
2026-08-17 16:11:15 +02:00
Michatec 7d69846bb0 feat(ui): implement RadioTheme with custom color support
Created a centralized `RadioTheme` component that handles system dark mode and custom background colors based on user preferences. Updated `LicenseFragment` to use the new theme.
2026-08-17 14:35:34 +02:00
Michatec 23d9b4e599 feat(ui): refactor fragment structure and implement Compose-based License screen
- Relocate all fragments to a new `.fragments` subpackage.
- Enable Jetpack Compose and add dependencies for Material3 and `aboutLibraries`.
- Implement `LicenseFragment` using Compose to display third-party library information.
- Update the navigation graph and localization strings to support the new License screen.
- Simplify station bitrate display logic in `LayoutHolder`.
- Add `composeCompiler` and `aboutLibraries` plugins to the build configuration.
2026-08-17 13:38:07 +02:00
Michatec aa7f545437 feat(network): standardize User-Agent header across network requests 2026-08-16 22:27:00 +02:00
Michatec ef9a607dbe feat(cast): add volume control to custom cast controller dialog
- Integrated a SeekBar for volume adjustment in the cast connection dialog.
- Implemented a Cast listener to synchronize volume state between the remote device and the UI.
- Added volume icons and updated the dialog layout to include the control bar.
- Managed listener registration and UI updates within the dialog lifecycle.
2026-08-16 20:31:45 +02:00
Michatec 7519153037 feat(binding): implement view binding in custom cast dialogs
Implemented View Binding in `CustomCastChooserDialogFragment` and `CustomCastControllerDialogFragment` to replace manual view lookups and improve lifecycle management.

- Replaced `findViewById` calls with `DialogCastChooserBinding`, `ItemCastDeviceBinding`, and `DialogCastConnectedBinding`.
- Added `onDestroyView` to properly nullify binding references.
- Updated `CastDeviceAdapter` to use View Binding in its `ViewHolder`.
2026-08-16 20:20:05 +02:00
Michatec 8df6b73869 feat(cast): implement custom cast dialogs and enhance remote UI
Implemented custom UI for Google Cast device selection and session control, alongside improvements to the web remote interface and playback service.

- Added `CustomCastChooserDialogFragment` and `CustomCastControllerDialogFragment` to provide a custom casting experience.
- Implemented `CustomCastDialogFactory` to integrate custom dialogs into `MediaRouteButton` and `ExpandedControllerActivity`.
- Added marquee scrolling for station names and metadata in the web remote interface.
- Improved `PlayerService` stability with safer resource cleanup in `onDestroy` and enhanced remote playback initialization.
- Updated `CollectionHelper` to include additional metadata fields for better station display during casting.
- Added localized strings for custom cast dialogs across multiple languages.
- Refined `CustomCastExpandedControllerStyle` and associated layouts for better UI consistency.
2026-08-16 19:47:52 +02:00
Michatec e450526692 Optimize MediaController.play to avoid redundant preparation
Added a check to verify if the requested station is already the current media item and in a valid playback state before re-setting the media item and preparing.
2026-08-16 10:47:19 +02:00