Reputation: 359
E/Android: Awesome Notifications: Invalid notification (no valid small icon): Notification(channel=basic_channel shortcut=null contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x11 color=0xff009688 vis=PRIVATE) (NotificationThread:58)
W/System.err(25254): me.carda.awesome_notifications.core.exceptions.AwesomeNotificationsException: Invalid notification (no valid small icon): Notification(channel=basic_channel shortcut=null contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x11 color=0xff009688 vis=PRIVATE)
W/System.err(25254): at android.app.NotificationManager.fixNotification(NotificationManager.java:606)
W/System.err(25254): at android.app.NotificationManager.notifyAsUser(NotificationManager.java:585)
W/System.err(25254): at android.app.NotificationManager.notify(NotificationManager.java:534)
W/System.err(25254): at android.app.NotificationManager.notify(NotificationManager.java:510)
W/System.err(25254): at me.carda.awesome_notifications.core.managers.StatusBarManager.showNotificationOnStatusBar(StatusBarManager.java:86)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.showNotification(NotificationSender.java:260)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.doInBackground(NotificationSender.java:147)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.doInBackground(NotificationSender.java:32)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationThread.runOnForegroundThread(NotificationThread.java:106)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationThread.execute(NotificationThread.java:34)
W/System.err(25254): at me.carda.awesome_notifications.core.threads.NotificationSender.send(NotificationSender.java:101)
W/System.err(25254): at me.carda.awesome_notifications.core.AwesomeNotifications.createNotification(AwesomeNotifications.java:569)
W/System.err(25254): at me.carda.awesome_notifications.AwesomeNotificationsPlugin.channelMethodCreateNotification(AwesomeNotificationsPlugin.java:1274)
Upvotes: 0
Views: 2210
Reputation: 289
remove the extension of the image from the image path like this:
'resource://drawable/res_notf_icon'
Upvotes: 0
Reputation: 2372
Did you initialize your awesome notification plugin like the below-mentioned code?
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await AwesomeNotifications().initialize(
// set the icon to null if you want to use the default app icon
'resource://drawable/res_app_icon',
[
NotificationChannel(
channelGroupKey: 'basic_channel_group',
channelKey: 'basic_channel',
channelName: 'Basic notifications',
channelDescription: 'Notification channel for basic tests',
defaultColor: Color(0xFF9D50DD),
ledColor: Colors.white)
],
// Channel groups are only visual and are not required
channelGroups: [
NotificationChannelGroup(
channelGroupKey: 'basic_channel_group',
channelGroupName: 'Basic group')
],
debug: true
);
runApp(const MyApp());
}
Upvotes: 0