Commit Graph
196 Commits
Author SHA1 Message Date
Michatec 40b5685c8a refactor(settings): centralize preference handling and simplify dialogs
Refactored `SettingsFragment` to use `OnSharedPreferenceChangeListener` for updating the UI, replacing multiple individual listeners and custom dialog interfaces. Simplified dialog classes by removing listener callbacks and relying on direct preference storage.

- Refactored `SettingsFragment` to centralize preference updates in `onSharedPreferenceChanged`.
- Removed `LanguageSelectionDialogListener`, `PresetSelectionDialogListener`, and `ThemeSelectionDialogListener` interfaces.
- Added a fallback artwork URL for casting when station-specific images are unavailable.
- Improved `PlayerService` lifecycle management to prevent service termination during casting or remote control active states.
- Modified sleep timer logic to only cancel on explicit user-initiated pauses.
- Updated `RemoteControlServer` to manage the server instance via a companion object.
- Updated README to reflect version 15.1+ features including Android TV and Google Cast support.
- Removed redundant `pause()` call in `MediaController.play` extension.
2026-08-16 00:34:06 +02:00
Michatec 3822be2e38 feat: implement playback resumption and add media playback attribution
- Added `MediaPlayback` attribution tag to `AndroidManifest.xml`.
- Implemented `onPlaybackResumption` in `PlayerService` to restore the last played station upon session restart.
- Updated `onConnect` to grant all available player commands to connecting controllers.
2026-08-11 14:15:05 +02:00
Michatec 14f2eeabe1 feat(remote-control): add remote authentication plugin and enhance API routes 2026-08-10 22:56:56 +02:00
Michatec 04ec33fad5 feat(remote-control): implement authentication for remote control access and update API documentation 2026-08-10 22:39:53 +02:00
Michatec 6ad627964b feat(websocket): add WebSocket support for real-time status updates and enhance API documentation 2026-08-06 19:44:25 +02:00
Michatec 41d46de4b8 feat(binding): implement view binding across multiple fragments and dialogs 2026-08-05 21:47:27 +02:00
Michatec 79e79b3811 feat(adapter): replace notifyDataSetChanged with DiffUtil and enhance remote control
Improved UI performance by implementing DiffUtil in CollectionAdapter and SearchResultAdapter. Updated the web remote control to display starred status and provide more accurate playback state reporting.

- Replaced manual notify calls with DiffUtil for efficient list updates.
- Added starred status to the web UI and remote control API.
- Fixed station reordering and expansion logic in CollectionAdapter.
- Improved playback resume logic in PlayerService to handle idle states.
- Prevented potential memory leaks by properly managing TextWatchers in ViewHolders.
2026-08-05 20:08:17 +02:00
Michatec ba404c04d3 feat(collection): add search and favorite filtering
Implemented a search bar and favorites filter for the station list. Added a search button to the station collection card, updated the adapter to handle filtered datasets, and integrated the search UI into both mobile and Android TV layouts. Includes localized strings for multiple languages.
2026-08-05 19:02:53 +02:00
Michatec cb1ca8ef80 update: replacing remote control in SettingsFragment.kt 2026-07-29 20:28:51 +02:00
Michatec 1d13948370 update: remove unused comment 2026-07-29 20:23:58 +02:00
Michatec 75dafd9460 update: disable release shrink ressources 2026-07-29 20:16:43 +02:00
Michatec 228c98c1f3 update: disable release minification 2026-07-29 20:14:05 +02:00
Michatec 8fa73ff6f9 feat: add web remote control with translations
- Implement embedded Ktor remote control server (port 8080)
- Add REST API endpoints for play/pause/next/prev/status
- Add web UI with localization support
- Add remote control preference toggle and settings integration
- Translate remote control strings to all supported languages
2026-07-29 19:45:08 +02:00
Michatec f6807f9ea5 feat(widget): internationalize favorites widget
Favorites widget now respects the selected language and theme. Added Ukrainian language support and updated the widget preview image.
2026-07-14 15:15:27 +02:00
Michatec f0d279895c feat(share): enhance sharing functionality with additional subject and title 2026-07-10 19:46:06 +02:00
Michatec cbfea35ff2 Update Favorites widget dimensions, preview image, and click behavior
- Adjust `minWidth` and `minHeight` and add resize constraints in `favorites_widget_info.xml`.
- Update `previewImage` to use a new dedicated preview drawable.
- Add a `PendingIntent` to the widget root and header to launch `MainActivity`.
2026-07-07 12:45:45 +02:00
Michatec e2ac535308 feat(widget): add favorites widget
Implement a home screen widget for quick access to favorite stations.
Features theme-aware styling, custom theme color support, and updates
on collection or theme changes. Includes localized strings for all
supported languages.
2026-07-07 12:21:31 +02:00
Michachatz 12f8b649ce Fix versionName from '15.0' to '15' 2026-07-04 10:04:57 +02:00
Michatec 6ddd7b2238 Update backup and data extraction rules
- Include shared preferences and external storage in backup configurations.
- Exclude the `temp` directory from external storage backups.
- Add explicit `device-transfer` rules to `data_extraction_rules.xml`.
2026-06-30 16:53:50 +02:00
Michatec 56de27466f feat(settings): implement hidden arguments system for advanced configuration
- Add a new "Arguments" field in the Advanced settings section.
- Implement SHA-256 hash-based argument checking in PreferencesHelper.
- Add support for a "Mute" mode (via hash) in PlayerService and SearchResultAdapter.
- Add support for toggling the Android TV overlay (via hash) in MainActivity.
- Update Keys.kt with new preference constants.
- Add translations for "Arguments" in all supported languages.
2026-06-30 16:18:29 +02:00
Michatec 4f07561239 Update banner and banner foreground icons 2026-06-30 14:13:31 +02:00
Michatec b65b666b81 Add fallback drawing logic to ShaderEffectView
- Implement `drawFallback` using standard Canvas APIs to support devices below Android 13 (API 33).
- Refactor `onDraw` to toggle between shader-based rendering and the fallback animation.
- Update `setColor` to store the current color and trigger a redraw via `invalidate()`.
- Add anti-aliasing to the paint instance and use a reusable `RectF` for fallback rendering.
2026-06-30 13:49:14 +02:00
Michatec 906b23188e feat(ui): add pulsing shader effect to station icon
Introduce a custom `ShaderEffectView` that uses AGSL (`RuntimeShader`) to display a pulsing glow animation behind the station icon during playback on supported Android versions (API 33+).

* **Shader Animation**: Created `ShaderEffectView` to render a hardware-accelerated rounded rectangle glow effect with configurable colors and pulse timing.
* **Layout Integration**: Added the shader view to both mobile and Android TV layouts, ensuring it is properly layered behind the station artwork.
* **Lifecycle Management**: Updated `PlayerFragment` and `LayoutHolder` to start or stop the animation based on playback state and to synchronize the glow color with the station's primary image color.
* **Visibility Logic**: Implementation ensures the effect is only visible when a station image is present and playback is active.
2026-06-26 23:41:40 +02:00
Michatec 7e7c6871ff chore(build): add clean task description and multicast permission
Add a descriptive string to the `clean` task in `build.gradle.kts` and include the `CHANGE_WIFI_MULTICAST_STATE` permission in the Android manifest.

* **Build Script**: Updated the `clean` task to include a description clarifying that it deletes the build directory.
* **Permissions**: Added the `CHANGE_WIFI_MULTICAST_STATE` permission to support network discovery features. Included `tools:ignore="LeanbackUsesWifi"` to suppress Lint warnings regarding Wi-Fi usage on Android TV devices.
2026-06-26 22:24:16 +02:00
Michatec 418955651e refactor: use Kotlin property syntax for Snackbar anchorView
- Replace `setAnchorView()` calls with the `anchorView` property in `PlayerFragment` and `MainActivity` for better Kotlin idiomaticity.
2026-06-13 15:20:07 +02:00
Michatec fe45779281 ui: update loading text color in activity_main 2026-06-13 15:14:05 +02:00
Michatec 5644c97c4c feat: improve metadata parsing and visualizer stability
- Enhance metadata extraction in `AudioHelper` by adding `VorbisComment` support and improving "Artist - Title" parsing for Icy streams.
- Implement thread safety in `ExtrasHelper` using a synchronization lock for native visualization and surface lifecycle management.
- Refactor visualizer update logic in `VisualizerFragment` to improve performance and error resilience.
- Remove redundant buffer position calls in `NativeAudioProcessor`.
- Clean up `AudioHelper` logic using Kotlin idiomatic patterns for string building and property access.
2026-06-07 13:22:11 +02:00
Michachatz 47786a6cbd Change app version name from 'Red' to 'Blue' 2026-06-04 11:16:55 +02:00
Michachatz 11cbac7e73 Update version code and name to 150 and 15.0 2026-06-04 11:15:59 +02:00
Michatec ae1e2aa784 chore(notification): update notification IDs
Increment the notification IDs used in `SettingsFragment` and
`PlayerFragment`. This updates the identifiers for the test,
share-app, and update-available notifications.
2026-06-01 19:52:26 +02:00
Michatec d654d79bd5 feat(notification): support custom notification IDs
Update `NotificationSys.showNotification` to accept an optional `id`
parameter. This allows different notifications to be displayed
simultaneously by the system instead of overwriting each other.

In `SettingsFragment` and `PlayerFragment`, assign specific unique IDs
for test, share, and update notifications.
2026-06-01 19:44:56 +02:00
Michatec 181ebd47df feat(ui): add custom theme color support and share app functionality
Introduce a new custom theme feature that allows users to personalize the application background color using RGB sliders, hex input, or a set of predefined palettes.

Key changes include:
* **Custom Theme Engine**: Added `CustomThemeFragment` and `ThemeHelper` to manage color selection and application. The UI dynamically updates the background color across the `MainActivity` and `PlayerFragment` when preferences change.
* **Android TV Support**: Provided a specialized layout for television devices (`fragment_custom_theme.xml` in `layout-television`) with optimized focus handling for D-pad navigation.
* **Share Feature**: Implemented a "Share App" preference in `SettingsFragment` that triggers a standard Android share intent and displays a thank-you notification upon use.
* **Localization**: Added Ukrainian language support and updated string resources for multiple locales (DE, DA, EL, FR, JA, NL, PL, RU) to include the new theme and share options.
* **Persistence**: Updated `PreferencesHelper` and `Keys` to store theme-related settings, including the enabled state, selected color, and predefined color index.
2026-06-01 19:32:46 +02:00
Michatec 4429ed4057 refactor(ui): use anchor view for Snackbars above bottom sheet
Replace manual bottom margin adjustments with `setAnchorView` for Snackbars to ensure they are positioned correctly above the bottom sheet on mobile devices.

- In `LayoutHolder`, make `bottomSheet` public to allow access from other components.
- In `PlayerFragment` and `MainActivity`, replace `FrameLayout.LayoutParams` modifications with `setAnchorView(bottomSheet)`.
- Maintain standard Snackbar behavior for Android TV where the bottom sheet is not present.
2026-05-31 23:06:57 +02:00
Michatec 83752c356f feat(android): refine notification permissions and UI layout
Add explicit `POST_NOTIFICATIONS` permission checks in `SettingsFragment` and `PlayerFragment` before triggering notifications or showing related preferences.

Update the permission launcher in `MainActivity` to provide a "Settings" action that links to the system application details when the notification permission is permanently denied.

Improve UI and system integration by:
* Adjusting `Snackbar` positioning with bottom margins in `MainActivity` and `PlayerFragment`.
* Updating `NotificationSys` to use a new channel ID with `IMPORTANCE_LOW`.
* Configuring `MainActivity` in `activity_main.xml` to handle orientation and screen size configuration changes manually.
2026-05-31 19:27:51 +02:00
Michatec c1bc8b3e19 refactor(android): simplify notification permission request
Remove the explicit permission type from the `RequestPermission`
contract in `MainActivity` to rely on default behavior or
internal contract handling.
2026-05-30 23:11:19 +02:00
Michatec 8835cadd6a fix(ui): specify notification permission type in launcher
Explicitly pass `Manifest.permission.POST_NOTIFICATIONS` to the
`RequestPermission` contract to ensure the correct permission is
requested on Android 13+.
2026-05-30 23:09:50 +02:00
Michatec 384926cf08 chore(build): disable debug mode in build configuration
Set `IS_DEBUG_ENABLED` to `false` in `app/build.gradle.kts` to prepare
the build configuration for release.
2026-05-30 22:51:25 +02:00
Michatec 2cf98b89b3 feat(notification): allow custom intent for notifications
Update `NotificationSys` to support passing a custom `Intent` when
showing notifications. This enables more flexible navigation, such as
opening a web URL for update notifications.

In `PlayerFragment`, use this new capability to trigger a browser
intent for update notifications on non-Android TV devices.
2026-05-30 22:48:26 +02:00
Michatec 6fa1e5e2c0 style(ui): update test notification icon
Replace the white notification icon with a standard 24dp icon in
SettingsFragment to ensure visual consistency.
2026-05-30 22:30:32 +02:00
Michatec 64d0f3a71f fix(android): resolve compilation error in TV feature detection
Update the Android TV feature check to use the instance-based
`packageManager` instead of the static `PackageManager` class.
This ensures the `hasSystemFeature` method is called correctly on
the available context instance.
2026-05-30 22:23:22 +02:00
Michatec c9122d74f8 refactor(android): fix Android TV feature detection syntax
Correct the usage of `hasSystemFeature` by calling it on the `packageManager` instance instead of the `PackageManager` class. This fixes a compilation error in `MainActivity` and `SettingsFragment`.
2026-05-30 22:18:32 +02:00
Michatec 1879827f4b feat(ui): add test notification preference and optimize Android TV logic
Introduce a "Test Notification" preference in the settings menu to allow users to verify the notification system. This preference is automatically hidden on Android TV devices to maintain a clean UI.

Additionally, refactor notification permission handling to skip requests on Android TV and improve the internal check for Leanback support using a lazy property.

Updated string resources for the new preference across all supported languages.
2026-05-30 22:15:51 +02:00
Michatec 23079649c5 style(i18n): fix typography in Danish notification description
Update the apostrophe in `notification_channel_description` to use a
typographic curly apostrophe for better linguistic accuracy in
Danish.
2026-05-30 21:36:22 +02:00
Michatec 2c7e02889d feat(i18n): add notification channel description to all languages
Add the `notification_channel_description` string resource to the
default and all localized string files to provide context for the
notification channel.
2026-05-30 21:33:43 +02:00
Michatec b1bcfa2137 style(i18n): update French typography in string resources
Replace standard apostrophes with typographic curly apostrophes in
`notification_test_content` and `snackbar_failed_permission_notification`
to improve French localization consistency.
2026-05-30 21:23:24 +02:00
Michatec 2814ff2cfa feat(android): implement POST_NOTIFICATIONS permission handling
Add NotificationSys to manage system notifications and update
MainActivity to request POST_NOTIFICATIONS permission on Android 13+.
Includes localized string resources for notification testing and
permission error feedback.
2026-05-30 21:17:01 +02:00
Michatec 2688f22a6a chore(app): add IS_DEBUG_ENABLED build config field
Introduce a `IS_DEBUG_ENABLED` boolean flag in `BuildConfig` for both
debug and release build types. This flag is used to suppress update
notifications in `PlayerFragment` when debugging and before its a version released.
2026-05-15 22:20:23 +02:00
Michatec 5d7df9550e feat(ui): add security preference to settings
Add a new security preference in the settings screen that links to the
SECURITY.md file on GitHub. This includes a new security icon and
localized strings for multiple languages.
2026-05-15 21:51:07 +02:00
Michatec dcae7bafb5 feat: apply custom theme to ExpandedControllerActivity 2026-05-07 13:49:37 +02:00
Michatec cf3fd0bc56 refactor(media): move MEDIA_BUTTON action to MediaSessionService 2026-05-07 13:43:58 +02:00