Git Product home page Git Product logo

Comments (2)

zoontek avatar zoontek commented on May 24, 2024 1

Hi 👋 This is expected, it cannot be known on Android before requested.

If you check the Android permission flow, you see that there's no way it returns blocked before calling request. That's also why the builtin module (PermissionsAndroid) return a boolean for check, and a status for request.

Note that you have this warning in the check README documentation:

Screenshot 2023-12-06 at 09 49 20

Consider this:

  • Before showing the screen that require the permission, check it
  • If it's granted, mount the screen that use it
  • If it's blocked, display a screen that explain that the user will have to go to settings to enable it (+ show a button that call openSettings) (will never ne visible on Android, but could be on iOS)
  • If it's denied, display a screen with a button to perform a request. After that, if it's granted -> mount the screen that use it. If it's blocked -> Display an alert or the blocked screen before encouraging going to the settings (using openSettings)

The UX is great on iOS, good enough on Android given the platform limitations

from react-native-permissions.

itsramiel avatar itsramiel commented on May 24, 2024

Thank you for the explanation!

from react-native-permissions.

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.