Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Whether to ask permission should be passed as a parameter #64

Open
fatadel opened this issue May 27, 2022 · 6 comments
Open

Whether to ask permission should be passed as a parameter #64

fatadel opened this issue May 27, 2022 · 6 comments

Comments

@fatadel
Copy link

fatadel commented May 27, 2022

First of all, thanks a lot for the package!

Second of all, I have a small concern. It's very likely that asking for notification permissions is a part of an already existing UI/UX, but if the functionality of this package is invoked earlier, then that flow is broken. Since it is possible to manage the app badge even without the permissions being granted, I think it should be possible to invoke the methods of this package passing a parameter for not asking for the permissions (which could be set to ask by default as it is now).

@FilledStacks
Copy link

Any update on this issue being tackled?

@eherbut
Copy link

eherbut commented Aug 12, 2022

+1 Relevant request
Need to have control over request permission dialog since it broke existing UX.

@mikah22
Copy link

mikah22 commented Aug 14, 2022

This is so important, not sure how this was missed. await FlutterAppBadger.isAppBadgeSupported(); should not ask for push notification permission. Right now when the app gets launched, I am using the above code to check whether the OS/phone supports app badges. It's such a bad user experience to ask for Notification permission as soon as the app launches.

@vincent-hoodoo
Copy link

I just spent a good two hours banging my head against the wall:

  • commenting all the code that could
  • uninstalling + reinstalling my app
  • rebooting my iPhone
  • digging into XCode cache busting options

all because I couldn't understand why in the world the notification permission was asked on every launch...

At no point in time did it occur to me that it could come from this plugin, since all I was doing in the initialisation phase is call isAppBadgeSupported()

@rafalbednarczuk
Copy link

If the project's minimum iOS version is at least 10.0, then workaround is to treat the device as supporting badges without calling isAppBadgeSupported().
That's because badges are supported on iOS 10.0+ devices.

final isAppBadgeSupported = Platform.isIOS ? true : await FlutterAppBadger.isAppBadgeSupported()

@amin79
Copy link

amin79 commented Mar 25, 2024

any updates?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants