Permission check

how to check when app open if the app have the permission for the camera?

try this extension and its CheckSInglePermission method

Taifun

the code:

it show me error:
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat;

it looks like that extension is outdated
try the IsPermissionGranted method from the tools extension App Inventor Extensions: Tools | Pura Vida Apps

IsPermissionGranted

Taifun

There is no "BluetoothScan" permission (as a string). It should be BLUETOOTH_SCAN.

Doesn't work on my test device (Android 14).

you know already, what I have to say now... :partying_face:

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

I tried, but it was not possible (for whatever reason).

you have to use the full permission string, which is android.permission.BLUETOOTH_SCAN
there is a comma in your latest example blocks...

Taifun

1 Like

Sorry, my eyes are tired and seem to be failing. :face_with_monocle: :upside_down_face:

But as I said, "BluetoothScan" does not work.

yes, because the text BluetoothScan is not a recognized permission... did you try the BluetoothScan helper block? I currently do not know, if the method is already able to understand the helper block...

Taifun

Yes, it does not accept non-strings.


grafik

I now updated the extension accordingly, try version 22a

IsGranted

You can use the permission helper block or a full permission string like android.permission.BLUETOOTH_SCAN

Taifun

1 Like

Thank you Taifun for all

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.