flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

zonedSchedule doesn't work with workmanager plugin (release mode)

Open Romain-Guillot opened this issue 1 year ago • 2 comments

Describe the bug FlutterLocalNotificationsPlugin.zonedSchedule doesn't work if workmanager plugin is also used. Latest version of workmanager tested: 0.5.2 (Sep 28, 2023)

To Reproduce I add the workmanager dependency to the example app: flutter_local_notifications/example

Here is the commit.

The app needs to be launched in release mode (in debug mode it works fine).

Expected behavior The following code works without workmanager plugin but doesn't work with the workmanager plugin installed.

    await flutterLocalNotificationsPlugin.zonedSchedule(
        123,
        'scheduled alarm clock title',
        'scheduled alarm clock body',
        tz.TZDateTime.now(tz.local).add(const Duration(seconds: 5)),
        const NotificationDetails(
            android: AndroidNotificationDetails('alarm_clock_channel', 'Alarm Clock Channel',
                channelDescription: 'Alarm Clock Notification')),
        androidScheduleMode: AndroidScheduleMode.alarmClock,
        uiLocalNotificationDateInterpretation: UILocalNotificationDateInterpretation.absoluteTime);

Sample code to reproduce the problem flutter_local_notifications/example. The app needs to be launched in release mode (in debug mode it works fine).

Related issues

  • #2074 - no solution provided (except removing workmanager)

Romain-Guillot avatar Feb 21 '24 15:02 Romain-Guillot

same problem

md-rifatkhan avatar Feb 22 '24 12:02 md-rifatkhan

I downloaded your fork, bumped the device_info_plus dependency and compileSdk version and built a release APK to put on my Pixel 8 and it works as expected https://github.com/MaikuB/flutter_local_notifications/assets/25263378/e7c64a65-4faa-4f38-a460-cea900dd3f77

MaikuB avatar Apr 13 '24 00:04 MaikuB

Closing as the information given didn't reproduce the issue and due to lack of further response

MaikuB avatar Jun 06 '24 22:06 MaikuB