fluttercommunity / fluttercommunity/flutter_launcher_icons

ic_launcher icon not working for android push notifications

Open
#537 3 comments 6 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
426
PR merge metrics
No merged PRs in 30d

Description

I added `flutter_launcher_icons: ^0.13.1` to my flutter project:

```
flutter_launcher_icons:
android: "ic_launcher"
ios: true
image_path: "assets/icon.png"
remove_alpha_ios: true
adaptive_icon_background: "assets/ic_background.png"
adaptive_icon_foreground: "assets/ic_logo.png"
```

all icons are working except the push notifications. the icon in the push notifications looking like this:

![Screenshot_20240117-123003](https://github.com/fluttercommunity/flutter_launcher_icons/assets/9454529/6b08a204-22a9-441d-b9fd-2ca790d75b2b)

![Bildschirmfoto 2024-01-17 um 12 24 35](https://github.com/fluttercommunity/flutter_launcher_icons/assets/9454529/c7e6c97b-6afb-4138-9b6a-1961d0bd9830)

i thinks its because of the missing ic_launcher icon in the folder because in my manifest I have:

`android:icon="@mipmap/ic_launcher"`

How is the right way to implement the push notifications icon with this plugin?

```
[✓] Flutter (Channel stable, 3.16.5, on macOS 14.1.2 23B92 darwin-arm64, locale de-DE)
• Flutter version 3.16.5 on channel stable at /Users/xxx/development/tools/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 78666c8dc5 (vor 4 Wochen), 2023-12-19 16:14:14 -0800
• Engine revision 3f3e560236
• Dart version 3.2.3
• DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/xxx/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/xxx/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/xxx/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A507
• CocoaPods version 1.14.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /Applications/Android Studio.app
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.85.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.80.0

[✓] Connected device (4 available)
• Pixel 6a (mobile) • 35171JEGR02908 • android-arm64 • Android 13 (API 33)
•iPhone (mobile) • 00008130-000A49440230001C • ios • iOS 17.2.1 21C66
• macOS (desktop) • macos • darwin-arm64 • macOS 14.1.2 23B92 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 120.0.6099.216
! Error: Browsing on the local area network for xxx iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
• All expected network resources are available.

• No issues found!
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Android manifest entry and the Flutter launcher-icons configuration shown in the report. Check how Android push notifications select their icon and whether this plugin documents or generates a compatible resource. Done means a supported configuration is identified, or the plugin's limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.