Git Product home page Git Product logo

Comments (3)

mlemos avatar mlemos commented on June 22, 2024

Other questions?

a) how to know if the user granted permission for ALWAYS or ONLY WHEN IN USE.

b) what is the difference, in the example, of the results from LocationPermissions().checkPermissionStatus() and the await LocationPermissions() .requestPermissions(permissionLevel: permissionLevel). It seems that the results are inconsistent between these two calls. As they should have the same results (after the user has permanently granted or not the permissions).

from flutter-permission-plugins.

mvanbeusekom avatar mvanbeusekom commented on June 22, 2024

@mlemos thank you very much for thanking the time and write this great and detailed bug report. It is really appreciated.

I have just released a hotfix (version 3.0.0+1) which (thanks to @filipproch) includes a fix for this issue. It also includes a fix for iOS which showed similar behavior (requesting "when-in-use" permissions also resulted in the plugin falsely reporting "always" permission were granted).

Regarding you other questions:

a) With this hotfix the plugin will now take the supplied PermissionLevel into consideration. So if you want to only request "when-in-use" permissions, you can call await LoctionPermissions().requestPermissions(permissionLevel: PermissionLevel.locationWhenInUse).

b) The checkPermissionStatus method is meant to only check if permissions are currently granted. The requestPermissions method is meant to really ask the user for permissions (if not yet permanently denied or granted).

Hope this helps. I will close the issue for now but please feel free to let me know if you have questions or if the problem still remains.

from flutter-permission-plugins.

guihackmann avatar guihackmann commented on June 22, 2024

Hi @mvanbeusekom

I followed all steps above, updated to the latest version, and I still have an issue with the checkPermissionStatus on Android when the user selects "Allow only while using the app".
Basically, when the prompt appears in Android:

  • If the user click in "Allow all the time", the Permission Status becomes "granted" (which is fine)
  • If the user clicks in "Deny", the status becomes "denied", (also fine)
  • If the user clicks in "Allow only while using the app", the status becomes "denied" (here is the problem)

On IOS all good.

from flutter-permission-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.