Adds asset artwork support and notification options#4
Merged
Conversation
Adds a native ContentProvider and updates the asset resolver to serve artwork via `content://` URIs. This allows Android Auto to access cached assets from the app's private directory, which is normally restricted to the app's own process.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Feat: Add asset artwork URI support and Android Auto integration
Updates the asset artwork caching mechanism to perform a full byte comparison, preventing stale artwork from persisting when an asset is updated but its file size remains unchanged. Adds a detailed debug message to guide developers when the MtAudioPlugin is not registered. This explains why Android Auto may fail to display artwork (due to reliance on cross-process inaccessible file:// URIs) and suggests a resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves audio artwork handling and playback control:
Features
asset:///URI scheme for audio item artwork. Bundled Flutter assets are automatically extracted to the cache directory, enabling their use in system notifications, Android Auto (viacontent://URIs through a new native provider), and Apple CarPlay (by stripping to bare asset paths).androidNotificationOngoingoption toMtAudioPlayerConfig, allowing control over whether the Android notification is dismissible when paused (defaults tofalse).onTaskRemovedhandler to stop playback when the app is swiped away on Android.Enhancements
MtArtworkwidget now robustly supportsasset://andfile://URI schemes alongside network URIs. It features resolution-aware image caching andgaplessPlaybackfor smoother transitions.MtTrackSkipButtonwidget when the playback queue contains only a single item, improving user experience for single-track or live stream scenarios.