rafaelsetragni / awesome_notifications

A complete solution to create Local Notifications and Push Notifications, throught Firebase or another services, using Flutter.
https://discord.awesome-notifications.carda.me
Apache License 2.0
757 stars 327 forks source link

basic_channel #977

Open jokerCheng-c opened 2 weeks ago

jokerCheng-c commented 2 weeks ago

W/Android: Awesome Notifications: Channel model 'basic_channel' was not found (ChannelManager:88) E/Android: Awesome Notifications: Notification channel 'basic_channel' does not exist. (NotificationContentModel:58) How should i solve the problem?

wishwelloklu commented 1 week ago

I ham having the same issue. It works in my emulator but not on my physical device

jawad111 commented 1 week ago

Initialize AwesomeNotifications in the main() entry point and the error will go away.

AwesomeNotifications().initialize(
    // set the icon to null if you want to use the default app icon
    null,
    [
      NotificationChannel(
          channelGroupKey: 'basic_channel_group',
          channelKey: 'basic_channel',
          channelName: 'Basic notifications',
          channelDescription: 'Notification channel for basic tests',
          defaultColor: Colors.blue,
          ledColor: Colors.white,
          importance: NotificationImportance.Max,
          )
    ],
    // Channel groups are only visual and are not required
    channelGroups: [
      NotificationChannelGroup(
          channelGroupKey: 'basic_channel_group',
          channelGroupName: 'Basic group')
    ],
    debug: true,

  );
ferdigokdemir commented 5 days ago

same issue, any update?

jawad111 commented 3 days ago

same issue, any update?

Have you tried the solution above?

ferdigokdemir commented 3 days ago

Yes fixed, thanks a lot.

jokerCheng-c commented 17 hours ago

Initialize AwesomeNotifications in the main() entry point and the error will go away.

AwesomeNotifications().initialize(
    // set the icon to null if you want to use the default app icon
    null,
    [
      NotificationChannel(
          channelGroupKey: 'basic_channel_group',
          channelKey: 'basic_channel',
          channelName: 'Basic notifications',
          channelDescription: 'Notification channel for basic tests',
          defaultColor: Colors.blue,
          ledColor: Colors.white,
          importance: NotificationImportance.Max,
          )
    ],
    // Channel groups are only visual and are not required
    channelGroups: [
      NotificationChannelGroup(
          channelGroupKey: 'basic_channel_group',
          channelGroupName: 'Basic group')
    ],
    debug: true,

  );

thanks bro