zoontek / react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
MIT License
4.04k stars 828 forks source link

Permission issue in vivo X70 #879

Closed TallNutAlt closed 3 months ago

TallNutAlt commented 3 months ago

Before submitting a new issue

Bug summary

` const permissions = [ PERMISSIONS.ANDROID.WRITE_EXTERNAL_STORAGE, PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE, ];

    const statuses = await Promise.all(
      permissions.map(permission => check(permission)),
    );`

I used check to check that these two permissions always returned ['denied ',' denied ']. After I made the request, there was no permission pop-up and I directly returned blocked. After commenting on the permission code, I downloaded an APK that can be used

Library version

"react-native-permissions": "^4.1.5",

Environment info

System:
  OS: Windows 11 10.0.22631
  CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
  Memory: 2.14 GB / 15.73 GB
Binaries:
  Node:
    version: 20.11.1
    path: D:\SDK\node.EXE
  Yarn:
    version: 1.22.22
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 10.2.4
    path: D:\SDK\npm.CMD
  Watchman:
    version: 20231008.002904.0
    path: C:\ProgramData\chocolatey\lib\watchman\tools\watchman-v2023.10.09.00-windows\bin\watchman.EXE
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java: 17.0.8
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Steps to reproduce

Apply for permission directly in this setting

Reproducible sample code

` const permissions = [
          PERMISSIONS.ANDROID.WRITE_EXTERNAL_STORAGE,
          PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE,
        ];

        const statuses = await Promise.all(
          permissions.map(permission => check(permission)),
        );

        const unavailablePermissions = statuses.filter(status => status === RESULTS.UNAVAILABLE);
        console.log(statuses,unavailablePermissions);`
zoontek commented 3 months ago

@TallNutAlt

Screenshot 2024-06-06 at 09 48 02

Existing duplicates: