Reputation: 3
I built an android app with custom icons in the notification. Running it in debug mode works fine, but when I install it in release mode the custom icons don't show up. How can I configure flutter to bundle custom icons so they get included in the right path in the app bundle, so that audio-service can load them?
So far I have manually included them in android/app/src/main/res/drawable:
Image: Project Directory Structure
Image: Notification with and without icons
Code:
static MediaControl like = MediaControl.custom(
androidIcon: 'drawable/up',
label: 'Like',
name: 'like',
);
static MediaControl dislike = MediaControl.custom(
androidIcon: 'drawable/down',
label: 'Dislike',
name: 'dislike'
);
static MediaControl oneStar = MediaControl.custom(
androidIcon: 'drawable/one',
label: 'Star',
name: 'star'
);
My repo with the bug: https://github.com/chrisheib/musicapp
Upvotes: 0
Views: 51