flutter local notification default sound doesn't work

Viewed 225

I implement the flutter local notification and it successfully send notification but with no sound . I make playSound : true ,it should play the default sound but it is not working . I uninstall and reinstall the app and still not working . Please give me a solution .

Code :

_testNotification() async {
        const AndroidNotificationDetails androidPlatformChannelSpecifics =
            AndroidNotificationDetails(
                'your channel id', 'your channel name', 'your channel description',
                importance: Importance.max,
                priority: Priority.high,
               playSound: true,
                showWhen: false);
        const NotificationDetails platformChannelSpecifics =
            NotificationDetails(android: androidPlatformChannelSpecifics);
        await flutterLocalNotificationsPlugin.show(
            0, 'plain title', 'plain body', platformChannelSpecifics,
            payload: 'item x');
      }
0 Answers
Related