Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Permission problem #79

Closed
trompetin17 opened this issue Feb 22, 2019 · 9 comments
Closed

Request Permission problem #79

trompetin17 opened this issue Feb 22, 2019 · 9 comments

Comments

@trompetin17
Copy link

Hi, when you have more that one plugin that uses onRequestPermissionsResult the other plugins was unable to receive this result because you are turning true here:

https://github.com/builttoroam/flutter_plugins/blob/addcd289a1a909892ab6408e3866dc4528020dcd/device_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/CalendarDelegate.kt#L93

Reading the source code you must return true only if you handle it if you don't handle you must return false.

@MaikuB
Copy link
Contributor

MaikuB commented Feb 28, 2019

Thanks for the info, will take a look at addressing this

@gerryhigh
Copy link

This is still broken. It is blindly returning true for a permission and return true at line 84 even it the permission (e.g. FINE LOCATION) is not what is being requested. Minimally check the permission type as well (not just the request code). This is a show stopper and was breaking the location plugin.

@MaikuB
Copy link
Contributor

MaikuB commented May 14, 2019

@gerryhigh any chance you could submit a PR as it seems like you have a fork for this already?

@uzairamer
Copy link

Someone needs to fix this ASAP, it has affected the location plugin.

@nickrandolph
Copy link
Contributor

@uzairamer feel free to contribute a fix as this is an open source plugin....

@gerryhigh
Copy link

@gerryhigh any chance you could submit a PR as it seems like you have a fork for this already?

I just submitted a PR. My fix was to return false to the check prior to the one mentioned in this fix for issue #79.

https://docs.flutter.io/javadoc/io/flutter/plugin/common/PluginRegistry.RequestPermissionsResultListener.html

My fork is here: https://github.com/gerryhigh/flutter_plugins

@pedromassango
Copy link

pedromassango commented May 15, 2019

Thanks for it. We need to get it solved. Anything that I can do to help? Also getting issue on Location package because of this.

@MaikuB
Copy link
Contributor

MaikuB commented May 15, 2019

@pedromassango if update your dependencies to point to @gerryhigh's fork then you should be able to test to see if it solves the issue for you

@MaikuB
Copy link
Contributor

MaikuB commented May 16, 2019

Have merged @gerryhigh's PR in and that's in the 0.1.2 release

@MaikuB MaikuB closed this as completed May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants