FR: Extend juce::RuntimePermissions

The problem with Android is that permissions can be disabled on a whim, no matter how you set them up, and JUCE doesn’t allow any flexible way of checking and prompting for the required permissions. This is especially problematic if we rely on file CRUD operations, and the user decides to disable file permissions (nothing we can control on the field, but we can definitely manage this in the app).

No solution is straightforward to extend JUCE: Android contains too many permissions to count (Manifest.permission  |  Android Developers) so I don’t think a reasonable request would be to “just add all of them” to the list of juce::RuntimePermissions::PermissionID.

Instead, a flexible option could be allowing users to check string versions of these IDs. (eg: QtAndroid::checkPermission)

PR: Extended the RuntimePermissions API to support any string. by jrlanglois · Pull Request #1110 · juce-framework/JUCE · GitHub

2 Likes

We really need this extremely bare necessity of an Android feature, and I’d prefer not hand-rolling my own solution or forking JUCE to get ahead. It’s unnerving that a cross-platform SDK with Android support doesn’t have the basic ability to check any permissions at any given point.

The PR is more or less ready to go and just needs some eye balls. Any feedback on the PR will be addressed immediately.

4 Likes

Can someone please have a look at this? We’ve had to resort to copy/pasting this class to able to check permissions like android.permission.INTERNET.

2 Likes