Can you add possibility to Stream SDK to NOT FORCE me to request permission on app start? #1182
Labels
compose
Used to issues related to compose components
core
Core implementation (LLC, WebRTC, WS..)
sample-app
Sample app related
starter-kit
Issue related to one of the starter kit projects
xml
Used for issues related to XML components
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.
The text was updated successfully, but these errors were encountered: