-
-
Notifications
You must be signed in to change notification settings - Fork 771
Closed
Labels
status: needs more infoWe need more information before we can continue work on this issue.We need more information before we can continue work on this issue.
Description
Please check the following before submitting a new issue.
- I have searched the existing issues.
- I have carefully read the documentation and verified I have added the required platform specific configuration.
Please select affected platform(s)
- Android
- iOS
- Linux
- macOS
- Web
- Windows
Steps to reproduce
I am using the following settings to obtain the device's location:
return AndroidSettings(
accuracy: LocationAccuracy.best,
distanceFilter: 2,
intervalDuration: const Duration(seconds: 2),
foregroundNotificationConfig: ForegroundNotificationConfig(
notificationChannelName:
localizations.userRecordingNotificationTitle,
notificationText: localizations.userRecordingNotificationText,
notificationTitle: localizations.userRecordingNotificationTitle,
enableWakeLock: false,
setOngoing: true,
notificationIcon: const AndroidResource(
name: "ic_notification", defType: "drawable"),
));- The
ic_notificationasset is a 96x96 PNG image with an alpha channel. - The asset is placed directly in the
drawablefolder.
I found this related issue #1258
Expected results
- The notification should be displayed correctly without causing an exception.
- On my Pixel 5 test device, the notification appears as expected, and the icon is visible.
Actual results
- A crash is reported with the following error message:
PlatformException(error, Invalid notification (no valid small icon): Notification(channel=geolocator_channel_01 shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT color=0x00000000 vis=PRIVATE), null, null). Error thrown . - Based on the Crashlytics report, it appears that Geolocator is using the fused location provider
- The issue has been reported on a Pixel 9 device.
Code sample
For code, please see above. I am not able to reproduce the crash on my devices.
Screenshots or video
No response
Version
13.0.2
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.1, on macOS 15.3.1 24D70 darwin-arm64, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] VS Code (version 1.98.0)
[✓] Connected device (4 available)
[✓] Network resources
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: needs more infoWe need more information before we can continue work on this issue.We need more information before we can continue work on this issue.