Closed Miara closed 2 months ago
Hey @Miara
Thanks for the report. I think it is actually a bug in the StreamNotificationManager
which should not call the permission notificationPermissionManager.start()
at all or do it per configuration.
We will update this along with some of the other bugs you opened. Look for our release next week.
Hey @Miara Would you check this PR -> #1186 would this suffice as a solution for you? I didn't want to change the name of the existing parameter because its a breaking change.
Thank you so much for addressing this issue! Yes, it is fine for me!
Where the problem comes from:
There is class:
NotificationPermissionManager
in this repo: https://github.com/GetStream/stream-android-push. in methodstart()
it requestsPOST_NOTIFICATION
permission from user, and show system dialog.That method above is called in method
registerPushDevice
inStreamNotificationManager
and
registerPushDevice()
is called bybuild()
method insideStreamVideoBuilder
. There is no way to avoid it in case when I haveNotificationConfig
configured with non empty list in parameterpushDeviceGenerators
Note that
NotificationConfig
has parameterrequestPermissionOnAppLaunch
but it covers only asking for permission on app start, but not right after building StreamVideo client.I could make some hacks, so to postpone StreamVideo building after POST_NOTIFICATION is granted, but I want to avoid that.
This issue is business blocker and I cannot integrate your SDK. Besides that, I found many bugs that I already reported in your repo. I look forward to your assistance with resolving these blockers.
Solution proposal
Imo there should be separate flag in
NotificationConfig
, such asrequestNotificationPermissionOnStreamLogin
orrequestPermissionOnAppLaunch
could be renamed forrequestNotificationPermission
- and cover both cases: App start, and StreamVideo builtAcceptance criteria
I am not forced to ask users about granting POST_NOTIFICATION_PERMISSION at app start. I want to decide when I will prompt users to grant it.