customerio / customerio-reactnative

MIT License
23 stars 11 forks source link

[Android below 13] CustomerIO.getPushPermissionStatus() returns always granted #235

Closed fmedinaUtoppia closed 6 months ago

fmedinaUtoppia commented 6 months ago

SDK version: 3.3.1

Environment: Development or Production Both

Describe the bug

CustomerIO.getPushPermissionStatus() returns always granted even if its disabled in Android below 13

To Reproduce

Go to settings, disable push notifications permissions, log the method, returns Granted.

Expected behavior

Should returns Denied.

Shahroz16 commented 6 months ago

Hey @fmedinaUtoppia, this method is just checking for Notificatiatio Permission which was introduced in Android 13, it doesn't check for the actual state. The permission concept for notifications was introduced in Android 13 not before that, because pre 13, notifications were always granted.