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

Support for Android private / signature permissions #887

Open
Qwin opened this issue Jul 26, 2024 · 1 comment
Open

Support for Android private / signature permissions #887

Qwin opened this issue Jul 26, 2024 · 1 comment
Assignees
Labels
feature request New feature or request

Comments

@Qwin
Copy link

Qwin commented Jul 26, 2024

Why it is needed?

Currently the Permission type does not support private/signature permissions like com.google.android.gms.permission.CAR_VENDOR_EXTENSION, I would like to ask to support those permissions as well or at least just allow freeform as an overload.

Possible implementation

requestMultiple([PERMISSIONS.ANDROID.BLUETOOTH_CONNECT, PERMISSIONS.ANDROID.BLUETOOTH_SCAN, "com.google.android.gms.permission.CAR_VENDOR_EXTENSION"])

just a note but the above does not work sadly I get unavailable and never get a prompt when I forcibly type it as Permission, while using AndroidPermissions (default react-native library) does work with the above code for the private permission

UPDATE:

looking at the code a bit closer I think the issue is with this method here not accounting for privledged / signature permissions:
image

UPDATE 2

So figured out the issue it seems that https://developer.android.com/reference/android/Manifest.permission doesnt have the CAR_VENDOR_EXTENSION permission in it due to it being a system level permission only given out to some companies. Because of that I propose the following solution:

requestMultiple(permission, { skipManifestCheck: true }), that way you can skip the check above and avoid it from being unavailable. 

UPDATE 3

looking at the permission itself based on this post, it seems to be a dangerous permission:
https://stackoverflow.com/questions/32061034/how-do-we-list-all-defined-permissions

Code sample

No response

@Qwin Qwin added the feature request New feature or request label Jul 26, 2024
@zoontek zoontek mentioned this issue Sep 3, 2024
@zoontek
Copy link
Owner

zoontek commented Sep 13, 2024

@Qwin This is not an issue anymore in v5.0.0, as the UNAVAILABLE status has been removed and this check is not done anymore (it's now BLOCKED - like the builtin PermissionsAndroid module that reply NEVER_ASK_AGAIN in such cases).

You need to cast the type:

check("com.google.android.gms.permission.CAR_VENDOR_EXTENSION" as Permission)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants