Skip to content

[@capacitor/local-notifications] - iOS and Android - No notification received when the setting manually changed. #2171

@hommalex

Description

@hommalex

Bug Report

Plugin(s)

"@capacitor/app": "^6.0.0",
"@capacitor/local-notifications": "^6.0.0",

Capacitor Version

6

Platform(s)

iOS And Android

Current Behaviour

  • open your application for the first time.
  • DO NOT allow receiving notification.
  • Switch to app setting
  • MANUALLY allow notification to be sent.
  • go back to your app. And run:
 await LocalNotifications.schedule({
          notifications: [
            {
              id: Math.floor((Math.random() * 1000000) + 1),
              title: 'Title',
              body: 'Body',
              schedule: {
                at: t, // any Date
                allowWhileIdle: true,
              },
            }
          ]
        });

Expected Behaviour

To the local notification to be send at t time.

What happen

No notification is send.

Note

This working fine if I allow the notification on first opening the app.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions