OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
625 stars 214 forks source link

[Bug]: OneSignal not detect granted permission from other plugin on Android #827

Open edisonlsm opened 10 months ago

edisonlsm commented 10 months ago

What happened?

When requesting the notification using another plugin, OneSignal on Android 13+ does not recognize that the app already has notification permission without calling requestPermission().

Steps to reproduce?

1. Init OneSignal with the App ID.
2. The subscription shows up on the dashboard when you install the app.
3. Request notification permission using other code/other plugin and not OneSignal itself (i.e., permission_handler) and grant the permission.
4.1. On iOS, the subscription permission status updates automatically to "granted" on dashboard.
4.2. On Android, the subscription permission status stays as "Not granted" until I call the requestPermission() method from OneSignal SDK.

What did you expect to happen?

I expected OneSignal to detect on Android 13+ when the permission was granted, as it does today on iOS.

OneSignal Flutter SDK version

5.0.4

Which platform(s) are affected?

Relevant log output

No response

Code of Conduct